
19 Sep
2021
19 Sep
'21
9:04 a.m.
Am 18.09.21 um 14:11 schrieb Branimir Maksimovic:
I don“t see how does that anything to do with Monad ČP It“s just what you pass as return value.
Nitpick: "return" and "is" are one and the same in Haskell; there's no software-detectable difference between an expression and its result in safe Haskell.
Do { … ... } that’s just syntactic sugar, to look more nicely.
The do syntax is syntactic sugar alright. However, it's not just the do block that's a monad, its top-level subexpressions must be monads as well. Regards, Jo