If you have a `IO<List<A>>` is there a...
# arrow
c
If you have a
IO<List<A>>
is there a great way to transform it into a
List<IO<A>>
instead of doing:
Copy code
val foo: IO<List<A>> = ...
val (bar) = foo
val final = bar.map { IO.just(it) }
j
In general you want to go the other way, but either way the function you are looking for is called
sequence
👍 1
c
Yeah I couldn't figure out the right syntax to get
sequence
working and the docs on traverse / sequence was much heavier than i was expecting/could handle last night, so i'll try to take another look at it today.