
11 Nov
2006
11 Nov
'06
2:57 p.m.
On 11/11/06, Aditya Siram
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, dmhouse@gmail.com