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

Unified Diff: sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate

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: sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate b/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
index 18f3e2df5813d986cb5b90a0f972dc83dfc05029..b5e28febb0b46228fb6e9e68c2bb60e3d5230c33 100644
--- a/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
@@ -19,7 +19,7 @@ class _ListWrapper<E> implements List<E> {
Iterable mappedBy(f(E element)) => new MappedIterable<E, dynamic>(this, f);
- List<E> where(bool f(E element)) => _list.where(f);
+ Iterable<E> where(bool f(E element)) => _list.where(f);
bool every(bool f(E element)) => _list.every(f);
@@ -76,8 +76,7 @@ class _ListWrapper<E> implements List<E> {
class _NodeListWrapper extends _ListWrapper<Node> implements List {
_NodeListWrapper(List list) : super(list);
- List<Node> where(bool f(Node element)) =>
- new _NodeListWrapper(_list.where(f));
+ Iterable<Node> where(bool f(Node element)) => new WhereIterable(this, f);
List<Node> getRange(int start, int rangeLength) =>
new _NodeListWrapper(_list.getRange(start, rangeLength));
@@ -137,8 +136,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
Iterable mappedBy(f(Node element)) =>
new MappedIterable<Node, dynamic>(this, f);
- Collection<Node> where(bool f(Node element)) =>
- new _NodeListWrapper(_Collections.where(this, <Node>[], f));
+ Iterable<Node> where(bool f(Node element)) => new WhereIterable(this, f);
bool every(bool f(Node element)) => _Collections.every(this, f);

Powered by Google App Engine
This is Rietveld 408576698