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

Unified Diff: sdk/lib/html/html_common/filtered_element_list.dart

Issue 11727007: Add min and max to Iterable and Stream. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Address review comments. Fix T->E in Iterable. 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/html_common/filtered_element_list.dart
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart
index 7c33c76e7efcd5f45f6bf755d9ea9c7eb583b7c6..39a311c3b873de51e138a8c0c2e215aa204d1dcd 100644
--- a/sdk/lib/html/html_common/filtered_element_list.dart
+++ b/sdk/lib/html/html_common/filtered_element_list.dart
@@ -166,4 +166,8 @@ class FilteredElementList implements List {
Element get last => _filtered.last;
Element get single => _filtered.single;
+
+ Element min([int compare(Element a, Element b)]) => _filtered.min(compare);
+
+ Element max([int compare(Element a, Element b)]) => _filtered.max(compare);
}

Powered by Google App Engine
This is Rietveld 408576698