[Haskell-beginners] Running a list of functions

Manfred Lotz manfred.lotz at arcor.de
Sat Aug 20 19:42:26 CEST 2011


Hi all,
Maybe a stupid question.

I have a list of functions [IO ()] and want to run those functions one
after another.

I did this 

     runList :: [IO ()] -> IO ()
     runList [] = return ()
     runList (f:fs) = do f
                         runList fs


which works fine.


However, I'm curious if there is a library function doing exactly this?



-- 
Manfred





More information about the Beginners mailing list