_This issue was originally filed by paulpmill...@gmail.com_
Currying is a well-known (in functional languages) technique of transforming a function that takes multiple arguments (or an n-tuple of arguments) in such a way that it can be called as a chain of functions each with a single argument (partial application).
I propose to add its support into dart. Dart could implement them scala-way to keep both named / optional params and currying:
a = function(params1)(params2)(params3) {
return params1 + params2 + params3
}
a(5)(6)(7)
_This comment was originally written by paulp...@gmail.com_
More on scala's currying:
http://www.scala-lang.org/node/135
http://www.codecommit.com/blog/scala/function-currying-in-scala
http://joelneely.wordpress.com/2008/03/22/currying-without-lab-rats/
_This comment was originally written by esprehn...@gmail.com_
The Function interface is empty which is silly. It should have a method on it to return a partially applied function just like Function.bind() in JS.
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
var addOne = function(a, b) { return a + b }.bind(1); // This should work in Dart
_Removed Type-Defect label._
_Added Type-Enhancement, Area-Language labels._
_Added WontFix label._
_This comment was originally written by paulp...@gmail.com_
Sorry, why this is WontFix?
Most helpful comment
_This comment was originally written by paulp...@gmail.com_
Sorry, why this is
WontFix?