Yeray Cabello
11/26/2019, 9:19 AMYeray Cabello
11/26/2019, 9:24 AMflatMap
, and not a map
so that's probably the piece I'm missing. I still don't fully get it.simon.vergauwen
11/26/2019, 9:36 AMfix
method.simon.vergauwen
11/26/2019, 9:37 AMsequence
for List<IO<A>>
returns IO<Kind<ForListK, A>>
simon.vergauwen
11/26/2019, 9:37 AMfix
on IO
before you return it to flatMap
which is no-op.simon.vergauwen
11/26/2019, 9:38 AMfix
on the nested HKT
there instead using map
as well.
val appliedFixSkins: IO<ListK<BananaSkin>> = getBananas().flatMap { bananas ->
bananas.map { banana ->
eat(banana)
}.sequence(IO.applicative()).map { it.fix() }
}
simon.vergauwen
11/26/2019, 9:39 AMYeray Cabello
11/26/2019, 9:59 AMsimon.vergauwen
11/26/2019, 10:00 AMAttila Domokos
11/26/2019, 1:30 PM.map { it.fix() }
, which looks and reads awkward. Can't wait for Arrow Meta. 👍