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
Is there a use case for having different implementations of OptionT.mapFilter and OptionT.subflatMap?
There's already a test enforcing the invariant that mapFilter should be consistent with subflatMap. Given this, should mapFilter delegate to subflatMap? If not, I'd be happy to add the reason to the scaladocs.
Having two implementations doing the same thing is a bit confusing, particularly as EitherT.mapFilter does not exist.
The text was updated successfully, but these errors were encountered:
They came from two different contexts. mapfilter is a method in the FunctorFilter type class while subflatmap is more native to the data type.
I agree that having OptionT.mapFilter be implemented in terms of OptionT.subflatMap would be less confusing.
Is there a use case for having different implementations of
OptionT.mapFilter
andOptionT.subflatMap
?There's already a test enforcing the invariant that
mapFilter
should be consistent withsubflatMap
. Given this, shouldmapFilter
delegate tosubflatMap
? If not, I'd be happy to add the reason to the scaladocs.Having two implementations doing the same thing is a bit confusing, particularly as
EitherT.mapFilter
does not exist.The text was updated successfully, but these errors were encountered: