Binding Environments (II)
LETREC allows bindings to reference each other
(letrec ((even? (lambda (x)
(or (zero? x) (odd? (sub1 x))))
(odd? (lambda (x)
(and (not (zero? x)) (even? (sub1 x)))))
(odd? 17))
This is an example of mutual recursion
Previous slide
Next slide
Back to first slide
View graphic version