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

Unified Diff: tools/dom/src/CssClassSet.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 | « tests/standalone/io/zlib_test.dart ('k') | tools/dom/src/WrappedList.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/CssClassSet.dart
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart
index 473c0370d1036b3ca20180d8d289e64fdf191dc3..29aa8602dd2cededcb19b7c9811b8aba4dd60994 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/CssClassSet.dart
@@ -62,6 +62,11 @@ abstract class CssClassSet implements Set<String> {
dynamic combine(dynamic previousValue, String element)) {
return readClasses().reduce(initialValue, combine);
}
+
+ dynamic fold(dynamic initialValue,
+ dynamic combine(dynamic previousValue, String element)) {
+ return readClasses().fold(initialValue, combine);
+ }
// interface Collection - END
// interface Set - BEGIN
« no previous file with comments | « tests/standalone/io/zlib_test.dart ('k') | tools/dom/src/WrappedList.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698