3 ms·
> Haskell do-notation, is it imperative? No it’s not. It only works in context of a monad and it achieves what looks like imperative code by utilizing closures
by ninetyninenine 2y ago
> Haskell do-notation, is it imperative?
No it’s not. It only works in context of a monad and it achieves what looks like imperative code by utilizing closures.
I think it’s quite obvious imperative code with mutations but a deterministic end result can be hidden behind a function and treated as pure. I don’t think anyone misses this point so it’s likely redundant to bring that up. Either way it’s not the point of the conversation.