NULLs

Hans-Dieter.Dreier@materna.de Hans-Dieter.Dreier@materna.de
Mon, 19 Jul 1999 12:18:35 +0200


--qhtX7nUzFMuCS6iIixdnkAs4foDnh2tx
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

sami@pefletti.saunalahti.fi wrote:

>Hans-Dieter.Dreier@materna.de wrote:
>
>>But why do you write "Just a" in the last line instead of "Just Int"?
>>And why the parentheses around "(Just a)"?
>
>in "Just a", 'a' is variable that is bound if the function argument matche=
s
>this case.

Is it also allowed to write "Just Int"? Would there be any difference (othe=
r than being independent of the name "a" in the definition of "Maybe a") ?

> parentheses are needed so that the compiler knows that "Just a" is
>a single
>pattern

What would happen it they were omitted?

>> The comment at the beginning says "...algebraic datatype...".
>>Does "algebraic" mean "numerical"?
>>How do we know it is algebraic - it looks rather generic to me, could by =
any
>type (say, a string)?
>
>no it doesn't mean numerical; it can be any type. another name for algebra=
ic
>datatypes is (disjoint) sum types

I must confess that I don't know what that means either.

--

Regards,

Hans-Dieter Dreier
(Hans-Dieter.Dreier@materna.de)=

--qhtX7nUzFMuCS6iIixdnkAs4foDnh2tx
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

IDENTIFIKATIONSANGABEN:
a15514a.txt IA5 DX-MAIL X.400 User Agent=

--qhtX7nUzFMuCS6iIixdnkAs4foDnh2tx--