[Haskell-cafe] Re: map (-2) [1..5]

David House dmhouse at gmail.com
Sat Sep 9 04:58:18 EDT 2006

On 09/09/06, Cale Gibbard <cgibbard at gmail.com> wrote:
> When I first ran into the problem with (-) and
> sections, I was slightly annoyed with having to write (+ (-1))

Let's not forget that there is the library function 'subtract' for
this purpose. What you wrote could be written as (subtract 1), which
is more readable in my opinion. But hey, what do I know, I think using
the underscore for unary negation (à la Emacs calculator) would be an
acceptable enough compromise.

-David House, dmhouse at gmail.com

More information about the Haskell-Cafe mailing list