I get the following error when I try the example at p.83 of "Learn You a Haskell for Great Good!":
Prelude> (sum . replicate 5) max 6.7 8.9
No instance for (Num (a0 -> a0 -> a0))
arising from a use of `sum'
add an instance declaration for (Num (a0 -> a0 -> a0))
In the first argument of `(.)', namely `sum'
In the expression: sum . replicate 5
In the expression: (sum . replicate 5) max 6.7 8.9
The example "sum . replicate 5 $ max 6.7 8.9" works without any problems.
Thanks for your interest in Learn You a Haskell for Great Good! This title is published by No Starch, and unfortunately we don't offer this kind of support for their books. No Starch can be contacted here: http://nostarch.com/contactus.htm.
Customer Service Representative
This reply was removed on 2013-11-20.
see the change log