I created a list of IO[Unit]
in order to retrieve data from a list of URL. But now how I convert it back to a single IO[Unit]
?
You can do this in the following way
val x: List[IO[Unit]] = ???
import cats.implicits._
val y: IO[List[Unit]] = x.sequence
val z: IO[Unit] = y.map(_ => ())