arrow
arrow copied to clipboard
Returning `Nothing` from shift instead of being polymorphic
https://github.com/arrow-kt/arrow/pull/2797#discussion_r958247534
Also discussed on Slack: https://kotlinlang.slack.com/archives/C5UPMM0A0/p1661181942207909
To me Nothing seems like the right type, to make them more like exceptions. In particular, the docs make this point, which I think is very relevant:
When you call this function, the compiler will know that the execution doesn't continue beyond the call.
Closed by #2839