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

Unified Diff: compiler/lib/implementation/regexp.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 | « compiler/lib/implementation/collections.dart ('k') | corelib/src/collection.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/regexp.dart
===================================================================
--- compiler/lib/implementation/regexp.dart (revision 3161)
+++ compiler/lib/implementation/regexp.dart (working copy)
@@ -75,6 +75,14 @@
}
}
+ Collection map(f(Match match)) {
+ List result = new List();
+ for (Match match in this) {
+ result.add(f(match));
+ }
+ return result;
+ }
+
Collection<Match> filter(bool f(Match match)) {
List<Match> result = new List<Match>();
for (Match match in this) {
« no previous file with comments | « compiler/lib/implementation/collections.dart ('k') | corelib/src/collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698