
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. Cheers, Spencer Janssen On Nov 13, 2006, at 11:57 PM, brad clawsie wrote:
it would be great if some of the more informed posters here took a stab at filling in
http://pleac.sourceforge.net/pleac_haskell/index.html
a neat site for cookbook-style problem solving
from looking over haskell documentation for a few months now, i would say what is missing is one central cookbook-style document (want to query a database? want to parse xml? etc etc)
thanks _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe