News for hackers. Stuff that matters.
Re:Currying in Python by Drbble on Monday March 19, 2012 @10:31AM (#3724053)
Ha, I write my Javascript like this. Makes me want to just go back to Haskell though. Does currying kill performance in Python like it does in Javascript?

To reduce clutter and unobscure the point, and support uncurried usage (like apply(f, args) however that is done in Python) , it needs more lambdas instead, of defs:

    f = lambda a: lambda b: f_uncurried(a, b)
Re:Currying in Python by kbd on Monday March 19, 2012 @10:39AM (#3724091)
> like apply(f, args) however that is done in Python

Python 2 has an apply function [1], but it was deprecated for a long time and removed in 3.0 [2]. apply(f, args) is equivalent to f(*args) in Python.

[1] http://docs.python.org/library/functions.html#apply

[2] http://docs.python.org/release/3.0.1/whatsnew/3.0.html#built...