News for hackers. Stuff that matters.
Re:Exotic List Monads by jitl on Thursday January 07, 2021 @05:54PM (#25678815)
No comments, because no one understand these (At least, I don't).
Re:Exotic List Monads by k__ on Thursday January 07, 2021 @06:04PM (#25678906)
Haskellers are asleep, let's post impure functions!

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

Re:Exotic List Monads by quchen on Thursday January 07, 2021 @06:31PM (#25679154)
:: IO ()
Re:Exotic List Monads by tempodox on Thursday January 07, 2021 @06:31PM (#25679147)
Blasphemy!
Re:Exotic List Monads by still_grokking on Friday January 08, 2021 @06:03PM (#25691659)
That's not a function. That's a procedure.
Re:Exotic List Monads by k__ on Saturday January 09, 2021 @08:44AM (#25700262)
Haha, impure function go brrr
Re:Exotic List Monads by yccs27 on Thursday January 07, 2021 @06:11PM (#25678958)
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.