Closed
Description
Add:
Map<K, V>.fromIterable(Iterable iterable, { K key(element), V value(element) });
key and value default to the identity function. (Still a small discussion going for the name of the optional arguments).
and
Map<K, V>.fromIterables(Iterable<K> keys, Iterable<V> values);
Examples:
new Map<int, String>.fromIterable([1, 2], value: (x) => "$x");
new Map<int, String>.fromIterables([1, 2], ["eins", "zwei"]);