Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fibs in your favourite language

Name: Anonymous 2008-12-20 15:04

fibs = 1 : zipWith (+) fibs (tail fibs)

Name: Anonymous 2008-12-21 11:39

>>37
primes = 2:3:5:[n | n <- [7,9..], all (\p -> (mod n p) /= 0) (takeWhile (\p -> let hpf = ceiling (sqrt (fromIntegral n)) in p <= hpf) primes)]
Improvements to the above are welcome.1



References
[1]. http://forums.xkcd.com/viewtopic.php?f=40&p=1172786#p1241663

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List