Question: need typed solution quickly (b) Consider the following function definitions in a lazy functional programming language: f(x0) = let x1 = x0 + x0 in
need typed solution quickly
(b) Consider the following function definitions in a lazy functional programming language: f(x0) = let x1 = x0 + x0 in let x2 = x1 + x1 in let y = x + xn in g(x0) = let gi() = x + x0 in 1* local function definition */ let g2() = gi() + gi() in let y = gn() + gn() in y i. What are the results of f(1) and g(1) as a function of n under call by need and call b name? (Note: Give 4 answers.) ii. In each of the 4 cases above, how many additions are executed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
