Coding Problems!! Please help
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
ons 2002-04-17 klockan 09.25 skrev Jack Tsai:
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 @_@
Well, normally I would tell you to ask your teacher for advice, but it seems you have done a lot of work yourself here, and only got stuck on the strange >.> operator. One of the things about this book which I don't like is that Thompson introduces a lot of non-standard functions. You can try to make the following definition in your file: (>.>) = flip (.) Regards, Martin -- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B
participants (2)
-
Jack Tsai -
Martin Norbäck