Question: Implement a function encode in Scheme, which takes a natural number n and returns the church encoding of n. For example, (encode 2) should return
Implement a function encode in Scheme, which takes a natural number n and returns the church encoding of n. For example, (encode 2) should return 2 (i.e., the function f. z. f (f z)).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
