[Haskell-beginners] Running a list of functions
Ertugrul Soeylemez
es at ertes.de
Sat Aug 20 21:35:02 CEST 2011
Ozgur Akgun <ozgurakgun at gmail.com> wrote:
> Actually in this case sequence and sequence_ are identical. You have
> IO for m, and () for a, so:
>
> sequence :: [IO ()] -> IO ()
> sequence_ :: [IO ()] -> IO ()
No, compare the type signatures:
sequence :: [IO ()] -> IO [()]
sequence_ :: [IO ()] -> IO ()
In the former case you will receive a list of as many values of type ()
as there are actions.
Greets,
Ertugrul
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
More information about the Beginners
mailing list