Skip to content

Instantly share code, notes, and snippets.

@cmoore
Created June 18, 2009 03:44
Show Gist options
  • Save cmoore/131685 to your computer and use it in GitHub Desktop.
Save cmoore/131685 to your computer and use it in GitHub Desktop.
-- Ahh, that's better!
p7 = ( filter isprime [ 1.. ] ) !! 10001
{-
1. [1..] - An infinite list, starting with 1, of integers. [1,2,3.. and so on]
2. (filter isprime x ) - Filter out of that list the numbers for which isprime is true.
3. !! 10001 - Take the 10001th element from that list.
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment