Chromium Code Reviews| Index: compiler/lib/implementation/array.dart |
| =================================================================== |
| --- compiler/lib/implementation/array.dart (revision 2973) |
| +++ compiler/lib/implementation/array.dart (working copy) |
| @@ -76,6 +76,10 @@ |
| Collections.forEach(this, f); |
| } |
| + Collection map(f(T element)) { |
| + return Collections.map(this, new List(), f); |
|
Jennifer Messerly
2012/01/05 22:54:21
minor style comment, I'd just use "[]" here instea
gbracha
2012/01/12 00:53:57
I'm of two minds on that. I agree it looks nice, b
|
| + } |
| + |
| Collection<T> filter(bool f(T element)) { |
| return Collections.filter(this, new List<T>(), f); |
| } |