What is the purpose of the static link in a frame in the run-time stack?
What is the purpose of the dynamic link in a frame in the run-time stack?
What information is stored in a function closure?
In C, you are not allowed to write a function inside another function. C allows you to treat a function as a value. Does C need to use function closures?
What is the value of Scheme expression (car (cdr (cons 'horse (cons 'zebra ()))))?
Write a Scheme function called prefix so that (prefix x y) returns true if list x is a prefix of list y. Be careful to use Scheme syntax correctly.
If you perform a single beta reduction on expression (lambda x. lambda y.x x y)(lambda z.zz), what do you get?
Explain the purpose of a dereference operation in the semantics of an imperative language.
How does a denotational semantics differ from an operational semantics?
Using Astarte syntax write a definition of a function called filter so that (filter p L) returns a list of all members x of list L such that p(x) is true. For example, if p is the predicate so that p(x) is true just when x < 100, then (filter p [3,81,200,34,999,3000,20]) = [3,81,34,20].
Indicate how the definition of filter might be changed to prevent filter from computing the entire list before returning part of the list, so that a function that only wants to look at part of the result of filter does not need to evaluate the entire result list.