3 ms·
[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
by miloszpp 11y ago
[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).