Last active
August 29, 2015 14:07
-
-
Save speedcell4/8911d850b33800e646c7 to your computer and use it in GitHub Desktop.
This file contains 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
(def prime-seq | |
((fn prime [seq] | |
(lazy-cat [(first seq)] (prime (filter #(not= 0 (rem % (first seq))) (rest seq))))) | |
(iterate inc 2))) | |
(take 10 prime-seq) | |
;; (2 3 5 7 11 13 17 19 23 29) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment