Permalink
Switch branches/tags
Nothing to show
Find file
1b0ec72 Oct 30, 2011
10 lines (6 sloc) 224 Bytes
reduce _ start [] = start
reduce fn start rest = reduce fn (fn start (head rest)) (tail rest)
x = reduce (+) 0 [1,2,3,4,5,6,7]
y = reduce (-) 28 [1,2,3,4,5,6,7]
main = do putStrLn (show x)
putStrLn (show y)