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

Unified Diff: runtime/lib/growable_array.dart

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error. 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
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index 5a008bec7298ae42c415de78d6a8732f30a503f8..82ceffbf089017d519fb754ef297647270fa99df 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -178,10 +178,7 @@ class _GrowableObjectArray<T> implements List<T> {
}
}
- Collection mappedBy(f(T element)) {
- return Collections.mappedBy(this,
- new _GrowableObjectArray.withCapacity(length), f);
- }
+ Iterable mappedBy(f(T element)) => new MappedIterable<T, dynamic>(this, f);
Ivan Posva 2012/11/26 18:29:09 ditto: curlys
floitsch 2012/11/28 13:48:23 Done.
reduce(initialValue, combine(previousValue, T element)) {
return Collections.reduce(this, initialValue, combine);

Powered by Google App Engine
This is Rietveld 408576698