[Haskell-cafe] Better writing about Haskell through multi-metaphor learning
Branimir Maksimovic
branimir.maksimovic at gmail.com
Sun Sep 19 09:20:14 UTC 2021
I didn’t thought on return function, on return as word, what you return from function.
> On 19.09.2021., at 11:04, Joachim Durchholz <jo at durchholz.org> wrote:
>
> 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
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
Once Monad always Monad, am I right?
Monad is also way to keep state, and monad passes state between functions?
IO Monad is just convenient way to describe side effects. I mean IO, when you see
That you always think side effect.
Greetings, Branimir.
More information about the Haskell-Cafe
mailing list