You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the implementation of rights from Haskell (https://hackage.haskell.org/package/base-4.9.1.0/docs/Data-Either.html), the right values are extracted from the either monad. Why is it not so in cats? The rights implementation from cats does not seem to be very useful if the values are not extracted.
The text was updated successfully, but these errors were encountered:
If I have a list of eithers and I am selecting only the right values, it's because I'm interested in what they contain, there is no left value anymore, no need to keep the either abstraction. If I don't want to extract them, it's easy to write (filter right? mylist). Also, this is compatible to what the rights function does in Haskell.
👍 to making rights mirror the one in Haskell, i.e. take a list of Eithers and return a list of the unwrapped Right values. Perhaps we could rename the current rights to keep-rights or similar.
In the implementation of
rights
from Haskell (https://hackage.haskell.org/package/base-4.9.1.0/docs/Data-Either.html), the right values are extracted from the either monad. Why is it not so in cats? Therights
implementation from cats does not seem to be very useful if the values are not extracted.The text was updated successfully, but these errors were encountered: