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

Side by Side Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 12094103: Added MappedListIterable/Iterator to implement map() on Lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding missing EmptyIteartor/Iterable Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 /** 7 /**
8 * Lazy implementation of the child nodes of an element that does not request 8 * Lazy implementation of the child nodes of an element that does not request
9 * the actual child nodes of an element until strictly necessary greatly 9 * the actual child nodes of an element until strictly necessary greatly
10 * improving performance for the typical cases where it is not required. 10 * improving performance for the typical cases where it is not required.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 dynamic reduce(dynamic initialValue, 132 dynamic reduce(dynamic initialValue,
133 dynamic combine(dynamic previousValue, Node element)) { 133 dynamic combine(dynamic previousValue, Node element)) {
134 return IterableMixinWorkaround.reduce(this, initialValue, combine); 134 return IterableMixinWorkaround.reduce(this, initialValue, combine);
135 } 135 }
136 136
137 String join([String separator]) { 137 String join([String separator]) {
138 return IterableMixinWorkaround.joinList(this, separator); 138 return IterableMixinWorkaround.joinList(this, separator);
139 } 139 }
140 140
141 Iterable map(f(Node element)) { 141 Iterable map(f(Node element)) {
142 return IterableMixinWorkaround.map(this, f); 142 return IterableMixinWorkaround.mapList(this, f);
143 } 143 }
144 144
145 List mappedBy(f(Node element)) { 145 List mappedBy(f(Node element)) {
146 return IterableMixinWorkaround.mappedByList(this, f); 146 return IterableMixinWorkaround.mappedByList(this, f);
147 } 147 }
148 148
149 Iterable<Node> where(bool f(Node element)) { 149 Iterable<Node> where(bool f(Node element)) {
150 return IterableMixinWorkaround.where(this, f); 150 return IterableMixinWorkaround.where(this, f);
151 } 151 }
152 152
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 final Node parent = this.parentNode; 276 final Node parent = this.parentNode;
277 parent.$dom_replaceChild(otherNode, this); 277 parent.$dom_replaceChild(otherNode, this);
278 } catch (e) { 278 } catch (e) {
279 279
280 }; 280 };
281 return this; 281 return this;
282 } 282 }
283 283
284 $!MEMBERS 284 $!MEMBERS
285 } 285 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698