Chromium Code Reviews| Index: runtime/lib/array.dart |
| =================================================================== |
| --- runtime/lib/array.dart (revision 4542) |
| +++ runtime/lib/array.dart (working copy) |
| @@ -216,6 +216,10 @@ |
| Collections.forEach(this, f); |
| } |
| + Collection map(f(E element)) { |
| + return Collections.map(this, new GrowableObjectArray.withCapacity(length), f); |
| + } |
| + |
|
siva
2012/02/23 19:11:46
Not for this change list but maybe a future refact
srdjan
2012/02/23 19:23:24
We need mixins :-). Having subclass hierarchies ju
|
| Collection<E> filter(bool f(E element)) { |
| return Collections.filter(this, new GrowableObjectArray<E>(), f); |
| } |