Hacker News new | ask | show | jobs
by jitl 1994 days ago
No comments, because no one understand these (At least, I don't).
2 comments

Haskellers are asleep, let's post impure functions!

function() {console.log(Math.random())}

:: IO ()
Blasphemy!
That's not a function. That's a procedure.
Haha, impure function go brrr
It seems like understanding the exotic monads themselves is not the point. To me, that page mostly shows that monad laws allow some weird Monad instances on the same data structure.

The only exotic monad which was intuitive to me was GlobalFailure, which interprets lists as "Maybe NonEmpty": An empty list signifies failure and aborts the whole computation, while non-empty lists behave as normal.