Index: compiler/lib/implementation/collections.dart |
=================================================================== |
--- compiler/lib/implementation/collections.dart (revision 3161) |
+++ compiler/lib/implementation/collections.dart (working copy) |
@@ -14,6 +14,15 @@ |
} |
} |
+ static List map(Iterable<Object> source, |
+ List<Object> destination, |
+ f(o)) { |
+ for (final e in source) { |
+ destination.add(f(e)); |
+ } |
+ return destination; |
+ } |
+ |
static bool some(Iterable<Object> iterable, bool f(Object o)) { |
for (final e in iterable) { |
if (f(e)) return true; |