Improve the type signature of orElse#575
Conversation
Current coverage is
|
|
👍 for the idea and type signature change. If the original |
The whole point of orElse is to drop the left hand value of a Disjunction, no sense having the type that is dropped influence the resulting type.
798d4c1 to
68e4e49
Compare
|
@ceedubs Sure! |
|
👍 thanks! |
There was a problem hiding this comment.
is there a difference in
case r @ Xor.Right(_) => r
and
case r => r
? The former is probably nicer to read, but does it come at a cost? i don't actually know and have wondered about this.
There was a problem hiding this comment.
I would be surprised if it did not come at a cost, but who knows, maybe the scala pattern matcher is smarter than I give it credit for. Happy to change it to r => r.
There was a problem hiding this comment.
I think it will essentially correspond to an else case, so it seems fine to me.
|
👍 |
…f_Xor Improve the type signature of orElse
This is the same as typelevel#575 but for Validated instead of Xor.
The whole point of orElse is to drop the left hand value of a Disjunction, no sense having the type that is dropped influence the resulting type.
Let me know if I am missing something! :-)