
Alberto G. Corona wrote:
Once more I forgot to send my messages to the haskell cafe list. All the rest of the list which I´m suscribed to, send the mail replies to the list automatically, but this doesn´t. Please, can this be changed?.
This comes up every so often, but I would be against this. Your e-mail client should support mailing lists.
this version of foldl IS strict:
foldlStrict f z0 xs0 = lgo z0 xs0 where lgo z [] = z lgo z (x:xs) =let t= f z x in t `seq` lgo t xs
main= print $ foldlStrict (+) 0 [1..1000000] 500000500000
so the garbage collector do the job in freeing the consumed part of the list
This is correct; the function you defined is equivalent to foldl' in Data.List, if I'm not mistaken. Regards, -- Jochem Berndsen | jochem@functor.nl GPG: 0xE6FABFAB