News for hackers. Stuff that matters.
Re:Scala's Option monad versus null-conditional operator in C# by miloszpp on Monday February 22, 2016 @06:43AM (#11150137)
[Author] Thanks for your remarks.

I agree on the first point. As to the second, I didn't mean that having flatmap is the reason why we can combine Options and Lists. I meant that Options are composable with other Options and Lists are composable with other Lists.

I understand the problem of working with different monads. I looked into monad transformers at some point and found them difficult to work with so my approach now is to avoid mixing monad types (for example instead of having Future[Option[T]], just use a failed Future instead of None).

There are no comments on this comment yet.