[Haskell-cafe] [IO Int] -> IO [Int]
Rich Neswold
rich.neswold at gmail.com
Fri May 4 13:34:21 EDT 2007
On 5/4/07, Phlex <Phlex at telenet.be> wrote:
>
> Hello all,
>
> I'm trying to learn haskell, so here's is my first newbie question.
> I hope this list is appropriate for such help requests.
>
> I'm trying to write a function with the signature [IO Int] -> IO [Int]
>
Control.Monad has a function (called "sequence") that does this for you. In
fact, "sequence" is a more generic solution since its signature is
(Monad<http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html#t%3AMonad>m
=> [m a] -> m [a]).
As a newbie, I found it educational to peruse the various modules in "
http://haskell.org/ghc/docs/latest/html/libraries/". Just start looking at
modules that sound interesting and see what has already been defined. Some
modules at first may be too advanced, but if you go back to them in a few
days (weeks?), they'll start making more sense, too.
--
Rich
AIM : rnezzy
ICQ : 174908475
Jabber: rich at neswold.homeunix.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070504/b8a8f82e/attachment-0001.htm
More information about the Haskell-Cafe
mailing list