Created
December 26, 2013 14:39
-
-
Save dcrystalj/8134561 to your computer and use it in GitHub Desktop.
racket dn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define (number-until stream cond) | |
| (letrec ([f (lambda (stream n) | |
| (let ([pr (stream)]) | |
| (if (cond (car pr)) (lambda() (f (cdr (pr)) (+ n 1))) (n) )))]) | |
| (f stream 0))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment