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

Unified Diff: sdk/lib/html/templates/html/impl/impl_Node.darttemplate

Issue 11727007: Add min and max to Iterable and Stream. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Created 7 years, 12 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/html/templates/html/impl/impl_Node.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_Node.darttemplate b/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
index 6389fc33e4a22eac0ddd5dd050f837ba6dc2790b..74fe51e4e4278c59a4ba3901de62bf0699c76982 100644
--- a/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
@@ -51,6 +51,14 @@ $else
}
$endif
+ Node min([int compare(Node a, Node b)]) {
+ return _Collections.minInList(this, compare);
+ }
+
+ Node max([int compare(Node a, Node b)]) {
+ return _Collections.maxInList(this, compare);
+ }
+
void add(Node value) {
_this.$dom_appendChild(value);
}

Powered by Google App Engine
This is Rietveld 408576698