Is there a function like `Either#merge` in Scala -...
# arrow
m
Is there a function like
Either#merge
in Scala - an extension on
Either<A, A>
that returns
A
? Shall I PR one?
r
I believe we had this at some point or was discussed with @Yeray Cabello but can't find it now so I'd say go for it 😊, thanks!
y
We went for
collapse
as the name back then. Since the terminology used in
fold
used that expression: Collapsing to a single type. In the end, it's
either.fold(:: identity, :: identity)
👍 1
Something happened and I never PRed it.
It's your cat, though, skin it any way you see fit.
s
did this ever get added? I can’t find it
m
It was merged just a couple of days ago. Don't know if it's in arelease yet
👍 1