https://kotlinlang.org logo
d

danneu

02/05/2017, 8:51 AM
at a glance, the downside of
Pair<Result, Error>
is that it's not an enum so you can have weird state like
Pair(42, new Exception("invalid"))
(success and fail states both defined), and pair has a weak stdlib for things you usually wanna do with this sort of datatype, like
.map
and
.mapError
.