Chez Scheme Transcript [Wed Mar 28 15:23:55 2012] > (lambda (x y) (let ([x x][y y]) (+ x y))) # > a)((lambda (x)((lambda (x) x) x)) 7)) Error: variable a is not bound. Type (debug) to enter the debugger. > ((lambda (x)((lambda (x) x) x)) 7)) 7 > ((lambda (x)((lambda (x) x) x)) 7) 7 > ((lambda (x)((lambda (x) x) x)) 7)) 7 > ((lambda (x)((lambda (x) x) x)) 7))) 7 > ((lambda (x)((lambda (x) x) x)) 7)))))))) 7 > ((lambda (x) ((lambda (x) x) x)) 7)) 7 > ((lambda (x) ((lambda (x) x) x)) 7) 7 > b)((lambda (y) (lambda (y) y)) 7) Error: variable b is not bound. Type (debug) to enter the debugger. > ((lambda (y) (lambda (y) y)) 7) # > ((lambda (x y) ((lambda (a b c) c) (+ x 2) (* y 3) c)) 4 5) Error: variable c is not bound. Type (debug) to enter the debugger. > d)((lambda (x) Error: variable d is not bound. Type (debug) to enter the debugger. > ((lambda (x) (let ([y 3]) (lambda (x)(+ x 3)))) 3) # > e)((lambda (x) Error: variable e is not bound. Type (debug) to enter the debugger. > ((lambda (x) ((let ([x (lambda (x) (+ x 1))]) x) x)) 3) 4 > ((lambda (x) ((let ([x (lambda (x) (+ x 1))]) x) x)) 3) 4 > 3 3 > 3 3 > 3 3 > 3 3 > f)((lambda (f) Error: variable f is not bound. Type (debug) to enter the debugger. > ((lambda (f) (f '((7 8) (9 10) (11 12)))) (lambda (x) ((lambda (f) (f (cdr x))) car))) (9 10) > ((lambda (f) (f '((7 8) (9 10) (11 12)))) (lambda (x) ((lambda (f) (f (cdr x))) car))) (9 10) > (define f (lambda (n) (let ([f (lambda (n) (if (= n 0) 1 (* n (f (- n 1)))))]) (f n)))) > (f 4) 24 > h)((lambda (x) Error: variable h is not bound. Type (debug) to enter the debugger. > ((lambda (x) ((lambda (x) ((lambda (x) (+ x 1)) (+ x 1))) (+ x 1))) 7) 10 > ((lambda (x) ((lambda (x) ((lambda (x) (+ x 1)) (+ x 1))) (+ x 1))) 7) 10 > (define list-recur (lambda (init f) (letrec ([g (lambda (ls) (if (null? ls) init (f (car ls) (g (cdr ls)))))]) g))) > (define foo (list-recur '() (lambda (x y) (append y (list x)))))) > (foo '(a b c d e)) (e d c b a) > (exit)