[Haskell-cafe] pleac, examples, etc

Pixel pixel at mandriva.com
Tue Nov 14 17:10:59 EST 2006


Spencer Janssen <sjanssen at cse.unl.edu> writes:

> Please do not use the PLEAC Haskell cookbook for learning Haskell.   The
> author redefined many of the standard operators to produce code  that isn't
> standard Haskell.
>
> Here are some choice snippets from the first chapter:
>
> Now, we all know that the (.) operator is function composition,  right?  Not
> in this example!  The author has silently defined "(.) =  flip ($)" -- a sort
> of reverse function application.
>> cut2fmt xs = xs.foldl aux (1,[]).snd.(GrabAll:).reverse
>
> Ah yes, (^) is surely exponent here?  Nope, it's some kind of unholy
> combination of show and (++).
>> s9 = "I have "^10+1^" guanacos."
>
> More of the same:
>> piece = s!![-8 .. -5]
>
>
> Complaining aside, I do agree with you: we need more example-style
> documentation.  Rewriting the PLEAC cookbook might be a good start.

i agree. A friend of mine did this haskell PLEAC version, and i would
really like to have a /standard/ haskell one.
(alas i've no more time to do it myself...)


More information about the Haskell-Cafe mailing list