
6 May
2010
6 May
'10
4:09 a.m.
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