News for hackers. Stuff that matters.
Re:Monads as a Programming Pattern by mrkeen on Monday August 12, 2019 @02:59PM (#20678679)
> However an optional is really just a list constrained to size 0 or 1.

True, but you've only written about them as data types, which misses the monadic part. What makes them monads is that you can join any Optional<Optional<T>> into an Optional<T>. Likewise you can join a List<List<T>> into a List<T>. It is that principled 'smooshing down' of the data types that makes them monads.

There are no comments on this comment yet.