[Haskell-beginners] The application of application

Daniel Trstenjak daniel.trstenjak at gmail.com
Sun Dec 2 10:31:31 CET 2012


Hi Christopher,


On Sat, Dec 01, 2012 at 01:39:22PM -0900, Christopher Howard wrote:
> (cos b * velocityC, sin b * velocityC)

vs.

> appPair (\x -> (x $ b) * velocityC) (cos, sin)


Duplication isn't always a bad thing. Programming in Haskell can be
quite tempting for code golfing.

The first version is simpler, shorter and even understandable for non Haskellers.

Sometimes the desire to look smart can result in quite horrible code.


Greetings,
Daniel



More information about the Beginners mailing list