Personal tools

User:WillNess

From HaskellWiki

Revision as of 14:36, 23 June 2011 by WillNess (Talk | contribs)

Jump to: navigation, search

I am a newbie, interested in Haskell.

I like this:

primes = 2 : 3 : ([5,7..] `minus`
                     foldi (\x:xs -> (x:) . union xs)
                           [[p*p,p*p+2*p..] | p <- tail primes])

foldi is on Tree-like folds. More at Prime numbers.