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
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.