Skip to content

Add currying #32

Closed
Closed
@DartBot

Description

@DartBot

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-not-plannedClosed as we don't intend to take action on the reported issuetype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions