Coding Problems!! Please help

Jack Tsai sesamejt@hotmail.com
Wed, 17 Apr 2002 07:25:22 +0000


This is a multi-part message in MIME format.

------=_NextPart_000_1da5_717b_3cf8
Content-Type: text/plain; format=flowed

Dear staff,
    I am currently working on an assignment with requires us to write in 
Haskell. I am having trouble with "pipeline". The required textbook called, 
"The Craft of Functional Programming" 2nd Edition.   There is a pipeline 
example, which I find it useful in my assignment, but for some reason, there 
may be a typo in the pipeline syntax, which is ">.>". Coz it doesn't compile 
@_@

I have attached a file of the example, I found from the book. There is a 
website where I could download the entire book. It's got the same stuff as 
in my textbook. Please help me, coz i've tried even Unix's pipeline syntax  
which is obviously wrong... I'm not desperate, please reply, thank you very 
much.

Sincerely,
Jack

This is the output of the compilor...
/*********************************************************************/
Haskell 98 mode: Restart with command line option -98 to enable

Reading file "C:\PROGRAM FILES\HUGS98\lib\Prelude.hs":
Parsing........................................................
Dependency analysis............................................
Type checking..................................................
Compiling......................................................
Reading file "E:\433\CHAPTE~1.LHS":
Parsing........................................................
Dependency analysis
ERROR "E:\433\CHAPTE~1.LHS" (line 22): Undefined variable ">.>"
Prelude>
/**********************************************************************/


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

------=_NextPart_000_1da5_717b_3cf8
Content-Type: text/plain; format=flowed
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Chapter10.lhs"

CglIYXNrZWxsOiBUaGUgQ3JhZnQgb2YgRnVuY3Rpb25hbCBQcm9ncmFtbWlu
ZwoJU2ltb24gVGhvbXBzb24KCShjKSBBZGRpc29uLVdlc2xleSwgMTk5OS4K
CglDaGFwdGVyIDEwCgpFeGFtcGxlOiBjcmVhdGluZyBhbiBpbmRleApeXl5e
Xl5eXl5eXl5eXl5eXl5eXl5eXl5eXgoKVGhlIGJhc2ljIHR5cGUgc3ltb255
bXMKCj4JdHlwZSBEb2MgID0gU3RyaW5nCj4JdHlwZSBMaW5lID0gU3RyaW5n
Cj4JdHlwZSBXb3JkID0gU3Rya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