When using Either: Is there an easier way to fall ...
# arrow
d
When using Either: Is there an easier way to fall back to another Either if the first one is Left? I have this
Copy code
val either1 = Either.catch { ... /* some logic here*/ }
        val either2 = Either.catch { ... /* some fallback logic here*/ }
        val either = if (either1.isRight()) either1 else either2
I thought there would be a function to chain the eithers somehow...
y
Copy code
either1.recover { either2.bind() }
2
d
that's it! thx!!
.bind
somehow fails to show in IntelliJ code completion...
y
It's an extension defined inside
Raise
, but I would expect it to still show up. That's strange. Might be something solved in K2