Question: The Algol-like program fragment function f(x) return x+5 end; function g(y) return 2-y end; f(g(2)); can be written as the following lambda expression: (?f. ?g.
The Algol-like program fragment
function f(x) return x+5
end; function g(y)
return 2-y end;
f(g(2));
can be written as the following lambda expression: (?f. ?g. f (g 2)) (?x. x+5) (?y. 2?y)
Reduce the expression to a normal form. In the reduction, assume that you are supplied with extra rules that allow you to reduce the addition or subtraction of two natural numbers into the corresponding results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
