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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

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/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index bd15590cd7e85bcff2febcaebe65ab189df8f3d5..a7f305d56b959aa22a55b18c2b44216e56a8922c 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -157,9 +157,8 @@ class _ChildrenElementList extends ListBase<Element> {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
- dynamic reduce(dynamic initialValue,
- dynamic combine(dynamic previousValue, Element element)) {
- return _childElements.reduce(initialValue, combine);
+ Element reduce(Element combine(Element value, Element element)) {
+ return _childElements.reduce(combine);
}
dynamic fold(dynamic initialValue,
@@ -272,14 +271,6 @@ class _ChildrenElementList extends ListBase<Element> {
return first;
}
- Element min([int compare(Element a, Element b)]) {
- return _childElements.min(compare);
- }
-
- Element max([int compare(Element a, Element b)]) {
- return _childElements.max(compare);
- }
-
Map<int, Element> asMap() {
return _childElements.asMap();
}

Powered by Google App Engine
This is Rietveld 408576698