Doobie transact over a list of ConnectionIO programs
Clash Royale CLAN TAG #URR8PPP Doobie transact over a list of ConnectionIO programs Let's say I have a list of Doobie programs (all with Unit type parameters, fwiw): Unit val progList: List[ConnectionIO[Unit]] = prog1 :: prog2 :: ... :: Nil Is there any way I can run them in one transaction? A for-comprehension won't work here, because I only know the precise composition of the program list at runtime. Essentially, I suppose I need to fold them together, I guess. I suppose this question applies to Free Monads in Cats in general, so I'll tag Cats as well. Thanks. You want to traverse List[ConnectionIO[Unit]] into ConnectionIO[List[Unit]] ? If so, that won't work: github.com/tpolecat/doobie/issues/465 – Yuval Itzchakov 2 hours ago List[ConnectionIO[Unit]] ConnectionIO[List[...