On Sat, 11 Nov 2006, David House wrote:

> 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.

E.g. this thread
  http://www.haskell.org/pipermail/haskell-cafe/2006-August/017403.html
continued here:
  http://www.haskell.org/pipermail/haskell-cafe/2006-September/017941.html
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to