Hi guys. I need an equivalent for: ```val result:T...
# arrow
a
Hi guys. I need an equivalent for:
Copy code
val result:Try<T> = Try.applicative().tupled()
Its related to kotlin arrow migration to 1.0
How can I do this operation with Either in 1.0
Copy code
val result:Try<Tuple2<T, W>> = Try.applicative().tupled(
  U -> Try<T>,
  V -> Try<W>
).fix()
this is the correct operation
I want to migrate this to Either<Throwable, Tuple2<T,W>> in arrow 1.0
Could you give me a reference for that?
Also I think there is no Tuple2 in 1.0. Why is that? it is superseeded by native Pair?
s
Hey @Alvaro Blazquez checa, Yes,
Tuple2
is superseded by
Pair
from the Kotlin Std.
You can do the operation in the following style in Arrow.
Copy code
val result: Either<Throwable, Pair<T, W>> =
  Either.catch { f() }
   .zip(Either.catch { g() }, ::Pair)
a
Great @simon.vergauwen thanks for helping me out again!!
👍 1