[Haskell-beginners] foldl' vs seq

Gabi bugspynet at gmail.com
Mon Feb 1 06:05:23 EST 2010

Update: I came up with the following somewhat faster function. But
still, it is much slower than the original foldl'

mySum2  (x:y:xs) = let sum = x + y
              in seq sum (sum + mySum2 xs)
mySum2 (x:[]) = x
mySum2 [] = 0

More information about the Beginners mailing list