Hacker News new | ask | show | jobs
by callmecosmas 4779 days ago
You don't actually need the second lambda since all Haskell functions take one argument, so you can just do

  f = \x y -> x + y
and you'll have an implicit lambda before the y.
3 comments

Yes, but that has an obvious lack of syntactic parallelism, one especially important when talking about currying since you might be tempted to relate that to the coffee script

    (X, y) -> x+y
It also has a subtly different performance characteristic in GHC, it turns out. Same semantics though.
And of course it has operator segmenting so you can just write

    f = (+)
Or simply:

  f x y = x + y