3 ms·
I'm not sure which definition you're referring to, but every one I've seen you'd be hard-pressed to use left as the 'good' value. The type's definition favours
by leshow 7y ago
I'm not sure which definition you're referring to, but every one I've seen you'd be hard-pressed to use left as the 'good' value. The type's definition favours 'right' for Functor/Applicative/Monad/etc instances.
- seppel 7y agoI'm referring to this comment: https://news.ycombinator.com/item?id=20224097 https://news.ycombinator.com/item?id=20224097
- leshow 7y agoThere are zero implementations of Left being the Ok value, just this hypothetical put forward by another commenter. edit: I should specify that I mean when Either is used as a 'Result' type. There are plenty of other use cases you can use Either outside of Ok/Err values.