CS 342 Lecture -*- Outline -*- * Lambda the Ultimate with lambda, you can do everything! ** the Y-combinator can be used to make recursive functions ------------- (define oh-no (Y (lambda (recurse) (lambda (x) (recurse x))))) (define length (Y (lambda (recurse) (lambda (l) (cond ((null? l) 0) (else (+ 1 (recurse (cdr l))))))))) ------------- ** closures can be used to delay evaluation ------------- (define (if-closures e1 c2 c3) (if e1 (c2) (c3))) (if-closures #t (lambda () (+ 3 4)) (lambda () (oh-no #t))) ; Value: 7 -------------