Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: runtime/lib/growable_array.dart

Issue 11412086: Make 'where' lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: FilteredIterable/Iterator -> WhereIterable/Iterator. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index 82ceffbf089017d519fb754ef297647270fa99df..55d9954bf074f3f124bc4931d3393b760cdc3a33 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -184,9 +184,7 @@ class _GrowableObjectArray<T> implements List<T> {
return Collections.reduce(this, initialValue, combine);
}
- Collection<T> where(bool f(T element)) {
- return Collections.where(this, new _GrowableObjectArray<T>(), f);
- }
+ Iterable<T> where(bool f(T element)) => new WhereIterable<T>(this, f);
Ivan Posva 2012/11/26 18:30:40 ditto
floitsch 2012/11/28 13:49:38 Done.
bool every(bool f(T element)) {
return Collections.every(this, f);

Powered by Google App Engine
This is Rietveld 408576698