``` data class Data(val a: String, val b: String) ...
# arrow
r
Copy code
data class Data(val a: String, val b: String)
data class Error(val msg: String)
val data : Either<Error, Data> = Either.applicative<Error>().map("".right(), Error("oops").left(), ::Data).fix()
//Left(Error("oops"))
👍 1
@carbaj0 the issue is the applicative instance is incorrectly parameterised
also if you just want to gather results you can use
tupled
map
is only useful if you plan to transform them in the map function otherwise tupled is all you need
☝️ 1