|
|
|
|
|
by still_grokking
352 days ago
|
|
Scala's new effect library Kyo just uses `map`. See: https://getkyo.io/#/?id=the-quotpendingquot-type-lt All pure values are automatically lifted into the Kyo monad, so `map` is effectively `flatMap`. From the linked docs: > This unique property removes the need to juggle between map and flatMap. All values are automatically promoted to a Kyo computation with zero pending effects, enabling you to focus on your application logic rather than the intricacies of effect handling. In the end it makes a lot of sense I think. What you do is manipulating values inside some wrapper. Whether this wrapper is a monad or not should not matter. Just do something with the value(s) inside, and that's mapping. |
|