(define while ; TYPE: (-> boolean), (-> void) -> void (lambda (test body) ; EFFECT: do the test, if it's true ; do the body; repeat until ; the test is false. ; NOTE: presumably the body changes something ; that the test checks (letrec ((loop ; TYPE: -> void (lambda () (if (test) (begin (body) (loop)))))) (loop)))) (define until ; TYPE: (-> boolean), (-> void) -> void (lambda (test body) (while (lambda () (not (test))) body)))