[Haskell-cafe] IO (Either a Error) question
Eugene Dzhurinsky
bofh at redwerk.com
Thu May 6 04:09:11 EDT 2010
On Thu, May 06, 2010 at 10:05:05AM +0200, David Virebayre wrote:
> A constructor can be seen as a function that takes some parameters and
> produces a value
>
> for example with the type Maybe a, which has 2 constructors ; Just and Nothing :
>
> Prelude> :t Just
> Just :: a -> Maybe a
>
> the constructor Just is a function that takes a value of type a and
> makes a value of type Maybe a.
>
> Prelude> :t Just
> Just :: a -> Maybe a
Ouch, that makes things clear. Thanks for the explanation!
--
Eugene N Dzhurinsky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100506/6b09f105/attachment.bin
More information about the Haskell-Cafe
mailing list