Haskell: Difference between revisions

Content deleted Content added
m Reverted edits by 85.103.166.102 to last version by 201.12.101.99
More complex examples: coherence with previous section
Line 56:
fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ]
 
YetThe anotherearlier factorial function, this time using a sequence of functions:
 
factfac n = (foldl (.) id [\x -> x*k | k <- [1..n]]) 1
 
A remarkably concise function that returns the list of [[Hamming number]]s in order: