Skip to content

Instantly share code, notes, and snippets.

@dcrystalj
Created December 26, 2013 14:39
Show Gist options
  • Save dcrystalj/8134561 to your computer and use it in GitHub Desktop.
Save dcrystalj/8134561 to your computer and use it in GitHub Desktop.
racket dn
(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