3 ms·
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 r
by Drbble 15y ago
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)
- kbd 15y ago> 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 http://docs.python.org/library/functions.html#apply [2] http://docs.python.org/release/3.0.1/whatsnew/3.0.html#builtins http://docs.python.org/release/3.0.1/whatsnew/3.0.html#built...