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

Will Ness will_n48 at yahoo.com
Sun Oct 18 19:31:56 EDT 2009

Luke Palmer <lrpalmer <at> gmail.com> writes:

> Or you could use the "subtract" function.
>   >>> map (subtract 2) [3,4,5]
>   [1,2,3]

I don't want to.

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

I do. Operators are great because they make our intent visible, immediately 
apparent. Long words' meaning, like subtract's, is not immediately apparent, 
and they break consistency. Not everyone's first language in life was English, 
you see.

(`foldl`2) works.

(`-`2) should too.

I'll settle for (+(-2)) for now, but it ain't that pretty.

More information about the Haskell-Cafe mailing list