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

Unified Diff: runtime/lib/array.dart

Issue 11366111: Make Iterable more powerful (and lazy). (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Fix current. was in Iterable and not Iterator. Created 8 years, 1 month 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
« no previous file with comments | « no previous file | sdk/lib/collection/collections.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index aa1168f3c998bd9578a0fc619206f7d428825183..7ae49b8c1164cd3953ba84e98193466f7f35b4fc 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -72,19 +72,19 @@ class _ObjectArray<E> implements List<E> {
this, new _GrowableObjectArray.withCapacity(length), f);
}
- reduce(initialValue, combine(previousValue, E element)) {
- return Collections.reduce(this, initialValue, combine);
- }
-
Collection<E> filter(bool f(E element)) {
return Collections.filter(this, new _GrowableObjectArray<E>(), f);
}
+ reduce(initialValue, combine(previousValue, E element)) {
+ return Collections.reduce(this, initialValue, combine);
+ }
+
bool every(bool f(E element)) {
return Collections.every(this, f);
}
- bool some(bool f(E element)) {
+ bool any(bool f(E element)) {
return Collections.some(this, f);
}
« no previous file with comments | « no previous file | sdk/lib/collection/collections.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698