Chromium Code Reviews| Index: runtime/lib/array.dart |
| =================================================================== |
| --- runtime/lib/array.dart (revision 2973) |
| +++ runtime/lib/array.dart (working copy) |
| @@ -84,6 +84,10 @@ |
| Collections.forEach(this, f); |
| } |
| + Collection map(f(E element)) { |
| + return Collections.map(this, new GrowableObjectArray(), f); |
|
ahe
2012/01/05 22:36:54
new GrowableObjectArray(length)
Ivan Posva
2012/01/05 22:47:03
Maybe even allocate a new ObjectArray(length), but
gbracha
2012/01/12 00:53:57
I suppose someone could compute the mapped collect
|
| + } |
| + |
| Collection<E> filter(bool f(E element)) { |
| return Collections.filter(this, new GrowableObjectArray<E>(), f); |
| } |