[Haskell-cafe] Re: [Haskell-beginners] map question

Luke Palmer lrpalmer at gmail.com
Sun Oct 18 18:59:34 EDT 2009


On Sun, Oct 18, 2009 at 4:47 PM, Will Ness <will_n48 at yahoo.com> wrote:
> Gregory Propf <gregorypropf <at> yahoo.com> writes:
>
>>
>>
>> I actually meant it as sort of a joke but maybe it's not after all.
>
> Seriously though, using anything non-ASCII in source code is a bad idea,
> because there are lots of fonts and editors in the world.
>
> It seems natural to me to have (`-`2) stand for (flip (-) 2), if only that
> would be made legal syntax, just as (`foldl`0) stands for (flip (foldl) 0).

Or you could use the "subtract" function.

  >>> map (subtract 2) [3,4,5]
  [1,2,3]

I don't think syntax sugar is worth it in this case.

Luke


More information about the Haskell-Cafe mailing list