[Haskell-beginners] IO action on a list of [IO a]
christopher.howard at frigidcode.com
Sun Oct 7 18:41:32 CEST 2012
On 10/06/2012 06:16 AM, Manfred Lotz wrote:
> Hi all,
> I want to do an IO action on a list of [IO a] like this:
> myfor :: (a -> IO () ) -> [IO a] -> IO ()
> myfor _  = return ()
> myfor f (x:xs) = do
> x' <- x
> f x'
> myfor f xs
> Is there a library function doing just this?
For the curious newbies among us: Why would you want to perform an IO
action on a list of IO actions?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 551 bytes
Desc: OpenPGP digital signature
More information about the Beginners