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

Unified Diff: compiler/lib/implementation/collections.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, 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: compiler/lib/implementation/collections.dart
===================================================================
--- compiler/lib/implementation/collections.dart (revision 2973)
+++ compiler/lib/implementation/collections.dart (working copy)
@@ -14,6 +14,15 @@
}
}
+ static List map(Iterable<Object> source,
+ List<Object> destination,
ahe 2012/01/05 22:36:54 Indentation.
+ bool f(o)) {
ahe 2012/01/05 22:36:54 Indentation.
+ for (final e in source) {
+ destination.add(f(e));
zundel 2012/01/06 14:42:12 I don't understand what this is supposed to do. I
gbracha 2012/01/12 00:53:57 Oops, cut-and-paste error. Obviously, the function
+ }
+ return destination;
+ }
+
static bool some(Iterable<Object> iterable, bool f(Object o)) {
for (final e in iterable) {
if (f(e)) return true;

Powered by Google App Engine
This is Rietveld 408576698