On 11/11/06, Aditya Siram <[EMAIL PROTECTED]> wrote:
subOne :: [Integer] -> [Integer]
subOne = map (- 1)

The short answer is that this is interpreted as negative unity, rather
than a section of binary minus. There are two common workarounds:

subOne = map (subtract 1)
subOne = map (+ (-1))

There's a whole minefield of opinions on whether this is the right
syntax or not. I'm sure you could google through the archives to
research this a bit more.

--
-David House, [EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to