Closed
Description
Many libraries and collection libraries have a map() function, allowing the programmer to specify a function which is applied to each element of a collection, collects the return value of the function, and returns a new collection.
In Ruby:
a = [ "a", "b", "c", "d" ]
b = a.map {|x| x + "!" }
b #=> [ "a!", "b!", "c!", "d!" ]
Proposal, for Dart:
var a = ['a', 'b', 'c'];
var b = a.map((x) => x + "!");
b # => ['a!', 'b!', 'c!']