Question: (25pt) Given the lambda expression (Afx.f (fx)) (Afx.f (fx)) fx (i) Reduce it using applicative order (call-by-value). (ii) Reduce it using normal order (call-by-name).
(25pt) Given the lambda expression (Afx.f (fx)) (Afx.f (fx)) fx (i) Reduce it using applicative order (call-by-value). (ii) Reduce it using normal order (call-by-name). (iii) Write a Scheme program, scheme for lambda.rkt, to test the results you obtained in (i) and (ii). Which of the results are certified to be correct by your program? Explain your answer. You need to define what the "globals" f and x do. Use this piece of code for that: (define f (lambda (z) (list 'f z))) (define x (lambda (z) (list 'x z)))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
