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

Unified Diff: sdk/lib/svg/dart2js/svg_dart2js.dart

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 | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/svg/dart2js/svg_dart2js.dart
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 4a8b38e226ba0b6e6344d94785f8ab1540c59243..feeb7450b8e4e646f196b0a9e94345de7f91365e 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -3073,6 +3073,10 @@ class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SV
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, Length)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(Length element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this, f);
@@ -3707,6 +3711,10 @@ class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SV
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, Number)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(Number element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this, f);
@@ -4617,6 +4625,10 @@ class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(PathSeg element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this, f);
@@ -5512,6 +5524,10 @@ class StringList implements JavaScriptIndexingBehavior, List<String> native "*SV
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, String)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(String element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
@@ -6684,6 +6700,10 @@ class TransformList implements List<Transform>, JavaScriptIndexingBehavior nativ
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, Transform)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(Transform element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(this, f);
@@ -7211,6 +7231,10 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementIn
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
+ dynamic fold(dynamic initialValue, dynamic combine(dynamic, ElementInstance)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
bool contains(ElementInstance element) => IterableMixinWorkaround.contains(this, element);
void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEach(this, f);
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698