Hacker News new | ask | show | jobs
by dragonwriter 1358 days ago
> That's also currying right?

No, currying is the transformation that takes a function f such that f(x0, x1, ... xn) = r and returns a function f' such that f'(x0)(x1)... (xn) = r.

Haskell doesn’t really have currying so much as having only one argument functions and a syntax for defining them that means one way to define a function that works like the result of currying a multiargument function looks a lot like defining a multiargument function in other languages.

1 comments

From another (probably less helpful but neat!) perspective, currying is turning x^(y*z) into (x^y)^z