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

Unified Diff: runtime/lib/array.dart

Issue 9456017: Fix issue 1741: add map to immutable list. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
===================================================================
--- runtime/lib/array.dart (revision 4542)
+++ runtime/lib/array.dart (working copy)
@@ -216,6 +216,10 @@
Collections.forEach(this, f);
}
+ Collection map(f(E element)) {
+ return Collections.map(this, new GrowableObjectArray.withCapacity(length), f);
+ }
+
siva 2012/02/23 19:11:46 Not for this change list but maybe a future refact
srdjan 2012/02/23 19:23:24 We need mixins :-). Having subclass hierarchies ju
Collection<E> filter(bool f(E element)) {
return Collections.filter(this, new GrowableObjectArray<E>(), f);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698