
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A lambda calculus homework assignment consisting of reducing lambda terms to normal forms using given steps and translating c code into lambda calculus. The assignment includes four exercises, each with a lambda term or c code snippet to be processed. The goal is to understand the concepts of lambda calculus and its relationship with functional programming.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

(a) (λx. λy. y x) 5 (b) (λx. λy. y x) 5 (λz.z + 3) (c) (λx. λy. x y) (λz.z + y) 7 (d) (λy.(λx. λy. x y) (λz.y z) 7) (λx.x + 1)
int apply_twice (int (f) (...), int x) { return f(x); } int twice (int (g)(...), int y) { return y + apply_twice(g, y); } int foo(int x) { return x + x; } int main() { return twice(foo, 5); }