On 17/08/06, Tamas K Papp <[EMAIL PROTECTED]> wrote:
The code in the subject generates an error. I understand why this is (- is treated as part of the number), but I don't know how to solve it, ie how to tell Haskell that - is a function/binary operator?
There's a Prelude function for exactly this purpose, which leads your code still quite readable: Prelude> map (subtract 2) [1..5] [-1,0,1,2,3] -- -David House, [EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe