Gopal S Akshintala
05/14/2021, 10:40 AMfilterOrElse
as Extensions to Either
instead of member functions? This won’t let to be used as a dot function when consumed from Java. I know Arrow is not designed for Java consumption, but is there any advantage of having this as extension over member? If not can these functions be made member fns, so we get an added advantage of consuming them from Javaraulraja
05/14/2021, 11:54 AMfilterOrElse
, flatMap
or others as members we find the following issue:. The error type in Either is covariant but filterOrElse, flatMap expect it in contravariant or invariant positions.raulraja
05/14/2021, 11:55 AMraulraja
05/14/2021, 11:56 AMGopal S Akshintala
05/14/2021, 11:58 AMraulraja
05/14/2021, 11:58 AMout
then we could support this as members but then you would not be able to accept subtypes, so this is the best we can do for now :)Gopal S Akshintala
05/14/2021, 11:59 AMGopal S Akshintala
05/14/2021, 11:59 AMraulraja
05/14/2021, 12:00 PMGopal S Akshintala
05/14/2021, 12:02 PM