3 ms·
> 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'
by dragonwriter 4y 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.
- dllthomas 4y agoFrom another (probably less helpful but neat!) perspective, currying is turning x^(y*z) into (x^y)^z