Skip to content

Instantly share code, notes, and snippets.

Created June 26, 2009 23:54
Show Gist options
  • Save anonymous/136825 to your computer and use it in GitHub Desktop.
Save anonymous/136825 to your computer and use it in GitHub Desktop.
(defn produce [value predicate generator]
(when (predicate value)
(lazy-seq (produce (generator value) predicate generator))))
(println "-begin")
(doall (map println (produce 1337 #(> % 0) #(unchecked-divide % 2))))
(println "-end")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment