News for hackers. Stuff that matters.
Re:Monads are monoids in the category of endofunctors by deepsun on Friday September 10, 2021 @02:48PM (#28485602)
Wow that's clearer. I wonder if just a list of examples (and counter-examples) would be enough to explain monads (preferrably with configurable syntax for Haskell-deprived folks).

Btw, I think you got a mistake there, in the third part of Option should be "Some(Some(o)) => Some(o), Some(None) => None, None => None", otherwise o can be not an Option at all.

Re:Monads are monoids in the category of endofunctors by lkitching on Monday September 13, 2021 @10:42AM (#28512115)
Your first two cases are equivalent to the `Some(o) => o` case; the syntax I used was a bit ad-hoc but the following F# typechecks:

    let join_option oo =
        match oo with
        | Some(o) -> o
        | None -> None