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

Unified Diff: runtime/lib/growable_array.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/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index ba0b90a16db6c22dc5f561cba632a1bef4ed6b1c..64d252b1eeefd18beb3376a0287abd252f7b55bc 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -208,10 +208,6 @@ class _GrowableObjectArray<T> implements List<T> {
throw new StateError("More than one element");
}
- T min([int compare(T a, T b)]) => IterableMixinWorkaround.min(this, compare);
-
- T max([int compare(T a, T b)]) => IterableMixinWorkaround.max(this, compare);
-
int indexOf(T element, [int start = 0]) {
return IterableMixinWorkaround.indexOfList(this, element, start);
}
@@ -264,8 +260,8 @@ class _GrowableObjectArray<T> implements List<T> {
return IterableMixinWorkaround.mapList(this, f);
}
- reduce(initialValue, combine(previousValue, T element)) {
- return IterableMixinWorkaround.reduce(this, initialValue, combine);
+ T reduce(T combine(T value, T element)) {
+ return IterableMixinWorkaround.reduce(this, combine);
}
fold(initialValue, combine(previousValue, T element)) {

Powered by Google App Engine
This is Rietveld 408576698