Lab 11
Here’s a tiny expression language of numbers and addition:
(define-type AE |
[num (n number?)] |
[add (lhs AE?) (rhs AE?)]) |
develop interp : AE? -> number
CPS-transform this to produce interp/k.
Add an ’abort’ variant to the AE.
update interp/k so that when it encounters an ’abort’, it halts without doing further computation.
develop my-foldl, that produces the same result and has the same contract as foldl
CPS-transform this to produce foldl/k.