[clean-list] help me

ZhangRuoyu zhangry@comp.eng.himeji-tech.ac.jp
Tue, 27 Mar 2001 18:42:51 +0900


This is a multi-part message in MIME format.

------=_NextPart_000_0033_01C0B6ED.BA3C6B00
Content-Type: text/plain;
	charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

I want to test the program in the tutorial, so I created a file like =
this:

module test
import StdEnv
//-------primes-----------------
divisible :: Int Int -> Bool
divisible t n =3D t rem n =3D=3D 0

denominators :: Int -> [Int]
denominators x =3D filter (divisible x) [1..x]

prime :: Int -> Bool
prime x=3D denominators x =3D=3D[1,x]

primes:: Int->[Int]
primes x=3D filter prime [1..x]


//------mapfun--------------------
mapfun [] x =3D []
mapfun [f:fs] x =3D[f x:mapfun fs x]

Start=3Dprimes 100
Start =3D mapfun [sqrt,sin,cos] 1.0

but I cannot test all the program at one time, I must use // like this:
//Start=3Dprimes 100
Start =3D mapfun [sqrt,sin,cos] 1.0

or=20

Start=3Dprimes 100
//Start =3D mapfun [sqrt,sin,cos] 1.0

can someone help me?

------=_NextPart_000_0033_01C0B6ED.BA3C6B00
Content-Type: text/html;
	charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-2022-jp" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I want to test the program in the =
tutorial, so I=20
created a file like this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>module test<BR>import=20
StdEnv<BR>//-------primes-----------------<BR>divisible :: Int Int -&gt; =

Bool<BR>divisible t n =3D t rem n =3D=3D 0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>denominators :: Int -&gt; =
[Int]<BR>denominators x =3D=20
filter (divisible x) [1..x]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>prime :: Int -&gt; Bool<BR>prime x=3D =
denominators x=20
=3D=3D[1,x]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>primes:: Int-&gt;[Int]<BR>primes x=3D =
filter prime=20
[1..x]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>//------mapfun--------------------<BR>mapfun [] x =3D=20
[]<BR>mapfun [f:fs] x =3D[f x:mapfun fs x]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Start=3Dprimes 100<BR>Start =3D mapfun =
[sqrt,sin,cos]=20
1.0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>but I cannot test all the program at =
one time, I=20
must use // like this:</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>//Start=3Dprimes 100<BR>Start =3D =
mapfun [sqrt,sin,cos]=20
1.0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>or </DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>Start=3Dprimes 100<BR>//Start =3D =
mapfun [sqrt,sin,cos]=20
1.0</FONT></DIV><BR>can someone help me?</DIV>
<DIV></DIV></FONT></BODY></HTML>

------=_NextPart_000_0033_01C0B6ED.BA3C6B00--