Search code examples
listhaskelldo-notation

Can you turn a Haskell list into a series of do instructions?


Can you create a list of functions and then execute them sequentially, perhaps passing them into do notation?

I'm currently doing this by mapping over a list of data and am wondering if I can call somehow pass the result as a series of sequential calls?


Solution

  • Something like this?

    sequence [putStrLn "Hello", putStrLn "World"]