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

Unified Diff: tools/dom/templates/immutable_list_mixin.darttemplate

Issue 13548002: Add Iterable.fold (and Stream.fold) which replace `reduce`. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | utils/pub/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/immutable_list_mixin.darttemplate
diff --git a/tools/dom/templates/immutable_list_mixin.darttemplate b/tools/dom/templates/immutable_list_mixin.darttemplate
index d238fcaab12a1bd45c7305c30dd880607f209b4b..81c72e257f465018c0f7f6ead1762dee63d17257 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -18,6 +18,10 @@ $endif
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, $E)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
$if DEFINE_CONTAINS
bool contains($E element) => IterableMixinWorkaround.contains(this, element);
$else
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | utils/pub/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698