(define (ex1 v1 v2)
(let ([f ...])
(f v1)
(f v2)))so that the value of (ex1 n m) is n+m for any integers n and m. The catch is that neither v1 nor v2 may appear in anywhere within the expression replacing "...".
(define (ex2 v1 v2)
(let ([mk ...])
(let ([f (mk)]
[g (mk)])
(f v1)
(g v2)
(g 0))))so that the value of (ex2 n m) is n+m for any integers n and m. As before, neither v1 nor v2 may appear in anywhere within the expression replacing "...".
(define (ex3 v1 v2)
(let ([mk ...])
(let ([f (mk)]
[g (mk)])
(f v1)
(g v2)
(g 0))))so that the value of (ex3 n m) is m for any integers n and m. As always, neither v1 nor v2 may appear in anywhere within the expression replacing "...".
(define (ex4 v1 v2 v3 v4)
(let ([mk ...])
(let ([f (mk)]
[g (mk)])
(f v1 v2)
(g v3 v4)
(list (f 0 0) (g 0 0)))))so that the value of (ex4 n m p q) is _(n+m+q m+p+q)_ for any integers n, m, p, and q. Of course, v1, v2, v3, or v4 may not appear in anywhere within the expression replacing "...".| Last update: Saturday, October 14th, 2000mflatt@cs.utah.edu |