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

Unified Diff: compiler/lib/implementation/array.dart

Issue 9114021: Added method map to Collection interface and all its implementations (except classes generated fr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « client/samples/swarm/DataSource.dart ('k') | compiler/lib/implementation/collections.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/array.dart
===================================================================
--- compiler/lib/implementation/array.dart (revision 3161)
+++ compiler/lib/implementation/array.dart (working copy)
@@ -76,6 +76,10 @@
Collections.forEach(this, f);
}
+ Collection map(f(T element)) {
+ return Collections.map(this, new List(), f);
+ }
+
Collection<T> filter(bool f(T element)) {
return Collections.filter(this, new List<T>(), f);
}
« no previous file with comments | « client/samples/swarm/DataSource.dart ('k') | compiler/lib/implementation/collections.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698