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

Unified Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.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: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
diff --git a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
index 2c5378f96881537b5024e81c93c1d00de05ce8bd..ef559ed355482fd06c3fcfd0e39ad6f64b70311e 100644
--- a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
+++ b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
@@ -223,11 +223,12 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
return new FixedSizeListIterator<Map>(this);
}
- dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
- return IterableMixinWorkaround.reduce(this, initialValue, combine);
+ Map reduce(Map combine(Map value, Map element)) {
+ return IterableMixinWorkaround.reduce(this, combine);
}
- dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) {
+ dynamic fold(dynamic initialValue,
+ dynamic combine(dynamic previousValue, Map element)) {
return IterableMixinWorkaround.fold(this, initialValue, combine);
}
@@ -337,12 +338,6 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
throw new StateError("More than one element");
}
- Map min([int compare(Map a, Map b)]) =>
- IterableMixinWorkaround.min(this, compare);
-
- Map max([int compare(Map a, Map b)]) =>
- IterableMixinWorkaround.max(this, compare);
-
void insert(int index, Map element) {
throw new UnsupportedError("Cannot add to immutable List.");
}

Powered by Google App Engine
This is Rietveld 408576698