Last active
August 29, 2015 14:06
-
-
Save pbalduino/d36d2d520579dde8cf8a to your computer and use it in GitHub Desktop.
Primos
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
| (loop [fs [] | |
| nums (range 2 23)] | |
| (let [f (first nums)] | |
| (if (empty? nums) | |
| fs | |
| (recur (conj fs f) | |
| (filter #(not= 0 (mod % f)) nums))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment