moocfi / haskell-mooc

Haskell MOOC University of Helsinki
Other
313 stars 446 forks source link

Set13b: foldM behaves like foldl (not foldr) #73

Closed yaxollum closed 1 year ago

yaxollum commented 1 year ago

From the documentation for foldM:

The foldM function is analogous to foldl, except that its result is encapsulated in a monad. Note that foldM works from left-to-right over the list arguments.

opqdonut commented 1 year ago

thanks!