Thomas Hartman wrote:
-- (myfoldl f q ) is a curried function that takes a list
-- If I understand currectly, in this "lazy" fold, this curried function
isn't applied immediately, because
-- by default the value of q is still a thunk
myfoldl f z [] = z
myfoldl f z (x:xs) = ( myfoldl f q ) xs
rather than ask the role of $! I found it helpful to first grasp the role
of seq, since $! is defined in terms of seq and seq is a "primitive"
operation (no prelude definition, like with IO, it's a "given").
What helped me grasp seq was its role in a strict fold.
Basically, try to sum all the n