Chromium Code Reviews| Index: runtime/lib/array.dart |
| diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
| index 89a550b7d6c7b595f0f4215fb26b28bc4dce66ae..5a06b674833410315c537fbb9e926153a24ce0cb 100644 |
| --- a/runtime/lib/array.dart |
| +++ b/runtime/lib/array.dart |
| @@ -73,9 +73,7 @@ class _ObjectArray<E> implements List<E> { |
| return Collections.reduce(this, initialValue, combine); |
| } |
| - Collection<E> where(bool f(E element)) { |
| - return Collections.where(this, new _GrowableObjectArray<E>(), f); |
|
Anders Johnsen
2012/11/20 06:32:21
You could clean up Collections as you go on with t
floitsch
2012/11/28 13:49:38
I usually remove the functions there.
|
| - } |
| + Iterable<E> where(bool f(E element)) => new FilteredIterable<E>(this, f); |
|
Lasse Reichstein Nielsen
2012/11/20 11:44:57
FilteredIterable => WhereIterable
floitsch
2012/11/28 13:49:38
Done.
|
| bool every(bool f(E element)) { |
| return Collections.every(this, f); |
| @@ -218,9 +216,7 @@ class _ImmutableArray<E> implements List<E> { |
| return Collections.reduce(this, initialValue, combine); |
| } |
| - Collection<E> where(bool f(E element)) { |
| - return Collections.where(this, new _GrowableObjectArray<E>(), f); |
| - } |
| + Iterable<E> where(bool f(E element)) => new FilteredIterable<E>(this, f); |
| bool every(bool f(E element)) { |
| return Collections.every(this, f); |