4 ms·
>Because of the way the rules of the Monad interface are structured you're guaranteed that the functions you use to compose your Monads together will be execute
by foldr 8y ago
>Because of the way the rules of the Monad interface are structured you're guaranteed that the functions you use to compose your Monads together will be executed in sequence with respect to their definition in your function body.
No! Monads don't guarantee sequencing. Some particular monad instances do (e.g. IO). But there's nothing inherently sequential about monads. See e.g. point 10 of the following:
https://wiki.haskell.org/What_a_Monad_is_not https://wiki.haskell.org/What_a_Monad_is_not
- agentultra 8y agoI knew I was going to get something about it wrong. Thanks for the clarification. It’s just one aspect that gets focused on because... IO and that's what the article focuses on. I got wrapped up in it too.
- theaeolist 8y agoThe page on "What a Monad is not" has numerous inaccuracies. I wouldn't take it too seriously.
- foldr 8y agoWhat inaccuracies are there in section 10?