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
Which they will be in most of the example code he used. They're not the best examples.
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.