Consider the following SLang 1 program:

((fn(f,g)=>fn(x)=>(f (g x)) fn(p)=>add1(p) fn(q)=>*(q,4)) 6)

What does it return when evaluated?

25
  • 28
  • a function
  • an integer different from 25 and 28
  • It produces an error, since it is not a valid SLang 1 program.

It may help you to build a complete parse tree for this expression.

What is the behavior of the first (leftmost) anonymous function?