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

Unified Diff: tools/dom/src/CssClassSet.dart

Issue 14071002: Added new version of reduce. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed more uses of max, and a few bugs. 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
Index: tools/dom/src/CssClassSet.dart
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart
index 30c0f26066a79e27e33934012f7dba9961da33ee..08d99f848dfef44c386bf9231150dbd5fddfbd15 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/CssClassSet.dart
@@ -58,9 +58,8 @@ abstract class CssClassSet implements Set<String> {
int get length => readClasses().length;
- dynamic reduce(dynamic initialValue,
- dynamic combine(dynamic previousValue, String element)) {
- return readClasses().reduce(initialValue, combine);
+ String reduce(String combine(String value, String element)) {
+ return readClasses().reduce(combine);
}
dynamic fold(dynamic initialValue,
@@ -170,10 +169,6 @@ abstract class CssClassSet implements Set<String> {
List<String> toList({ bool growable: true }) =>
readClasses().toList(growable: growable);
Set<String> toSet() => readClasses().toSet();
- String min([int compare(String a, String b)]) =>
- readClasses().min(compare);
- String max([int compare(String a, String b)]) =>
- readClasses().max(compare);
Iterable<String> take(int n) => readClasses().take(n);
Iterable<String> takeWhile(bool test(String value)) =>
readClasses().takeWhile(test);

Powered by Google App Engine
This is Rietveld 408576698