-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add currying #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was originally written by [email protected] More on scala's currying: |
This comment was originally written by [email protected] 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. |
This comment was originally written by [email protected] Added Triaged label. |
Added WontFix label. |
This comment was originally written by [email protected] Sorry, why this is |
This issue was originally filed by [email protected]
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)
The text was updated successfully, but these errors were encountered: