newbie syntax question
Cagdas Ozgenc
co19@cornell.edu
Tue, 24 Jul 2001 23:07:27 +0300
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C11495.688B0B30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I am extremely new to Haskell. This will be my first question, so go =
easy. I have just read Chapter 1 on Simon Thompson's book.
for example a function declaration is given as follows
scale : : Picture -> Int -> Picture
If the first two types are input variables why does the syntax require =
me to use arrows twice? I mean isn't the following syntax more readable =
(hypothetically)?
scale : : Picture , Int -> Picture
Is there a specific reason not to be able to distinguish the input =
parameters from the output parameter?
Thanks
------=_NextPart_000_000F_01C11495.688B0B30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I am extremely new to Haskell. This =
will be my=20
first question, so go easy. I have just read Chapter 1 on Simon =
Thompson's=20
book.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>for example a function declaration is =
given as=20
follows</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>scale : : Picture -> Int ->=20
Picture</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>If the first two types are input =
variables why does=20
the syntax require me to use arrows twice? I mean isn't the following =
syntax=20
more readable (hypothetically)?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>scale : : Picture , Int -> =
Picture</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there a specific reason not to be =
able to=20
distinguish the input parameters from the output parameter?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_000F_01C11495.688B0B30--