Is there an idiomatic FP way of returning the firs...
# arrow
t
Is there an idiomatic FP way of returning the first
Left
value from a list of
Either
types? I am currently doing it like so:
Copy code
listOf(either1, either2, either3).first{
    it.isLeft()
}.swap().getOrHandle { Unit } // there will be a value for sure, no need to handle
or is this fine?