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

Unified Diff: runtime/lib/typeddata.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: runtime/lib/typeddata.dart
diff --git a/runtime/lib/typeddata.dart b/runtime/lib/typeddata.dart
index 35eed4ff9839a58c95d1d0f287b479d7b7aea210..26445b805fb71cdfb93862a4907d818ec7e6b2d2 100644
--- a/runtime/lib/typeddata.dart
+++ b/runtime/lib/typeddata.dart
@@ -307,9 +307,8 @@ abstract class _TypedListBase {
return IterableMixinWorkaround.join(this, separator);
}
- dynamic reduce(dynamic initialValue,
- dynamic combine(dynamic initialValue, element)) {
- return IterableMixinWorkaround.reduce(this, initialValue, combine);
+ dynamic reduce(dynamic combine(value, element)) {
+ return IterableMixinWorkaround.reduce(this, combine);
}
dynamic fold(dynamic initialValue,
@@ -450,12 +449,6 @@ abstract class _TypedListBase {
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) =>
- IterableMixinWorkaround.min(this, compare);
-
- int max([int compare(int a, int b)]) =>
- IterableMixinWorkaround.max(this, compare);
-
void removeRange(int start, int length) {
throw new UnsupportedError(
"Cannot remove from a non-extendable array");

Powered by Google App Engine
This is Rietveld 408576698