[Haskell-beginners] Running a list of functions

David Place d at vidplace.com
Sat Aug 20 20:08:43 CEST 2011


sequence_ :: Monad m => [m a] -> m ()
____________________
David Place   
Owner, Panpipes Ho! LLC
http://panpipesho.com
d at vidplace.com



On Aug 20, 2011, at 1:42 PM, Manfred Lotz wrote:

> 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
> 
> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners




More information about the Beginners mailing list