by pluies_public · 14y ago · 0 comments
If you type flod instead of fold, the compiler will complain. If you have an off-by-one error in your for loop, not so much.
foldl :: (a -> b -> a) -> a -> [b] -> a
foldr :: (a -> b -> b) -> b -> [a] -> b
So the only time it will be the same is if a and b are the same type.Which they will be in most of the example code he used. They're not the best examples.