Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting

Authors: Elizabeth A. Gordon, Jana S. Raedy, Alexander J. Sannella

1st edition

978-0133251579, 133251578, 013216230X, 978-0134102313, 134102312, 978-0132162302

More Books

Students also viewed these Computer Network questions

Question

Find vo (t) in the circuit of Fig. 16.46. 1 H

Answered: 1 week ago