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

Unified Diff: sdk/lib/html/src/_Collections.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: sdk/lib/html/src/_Collections.dart
diff --git a/sdk/lib/html/src/_Collections.dart b/sdk/lib/html/src/_Collections.dart
index 1fdda567779973889b3d57eea566fff5fabcde0b..e24029df9743453e2e5239db7e3a2da01aeeec1c 100644
--- a/sdk/lib/html/src/_Collections.dart
+++ b/sdk/lib/html/src/_Collections.dart
@@ -23,13 +23,8 @@ class _Collections {
}
}
- static List mappedBy(Iterable<Object> source,
- List<Object> destination,
- f(o)) {
- for (final e in source) {
- destination.add(f(e));
- }
- return destination;
+ static Iterable mappedBy(Iterable<Object> source, f(o)) {
+ return new MappedIterable(source, f);
}
static bool some(Iterable<Object> iterable, bool f(Object o)) {

Powered by Google App Engine
This is Rietveld 408576698