<div dir="auto">You can turn `[IO a]` into `IO [a]` by traversing the Traversable and sequencing the actions using `sequence`.<div dir="auto"><br></div><div dir="auto">Note that what it creates is a slightly different IO computation that re-organizes the results, you'll still need to run that IO in the end.</div><div dir="auto"><br></div><div dir="auto">Typically, it's passed all the way down to your closest use of IO (often main for beginners) where you'll be able to finally get rid of it by performing the effects and doing something with the results. The flavor of choice depends on the situation but I find the IO monad very readable.</div><div dir="auto"><br></div><div dir="auto">main :: IO ()</div><div dir="auto">main = do</div><div dir="auto"> listOfA <- sequence ioListOfA</div><div dir="auto"> -- Use listOfA from here</div><div dir="auto"><br></div><div dir="auto">Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 4, 2017 12:05 PM, <<a href="mailto:info@maximka.de">info@maximka.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the way to transform a list of [IO XXX] type to [XXX]?<br>
<br>
Thanks,<br>
Alexei<br>
______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
</blockquote></div></div>