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

Side by Side Diff: frog/lib/corelib_impl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/lib/collections.dart ('k') | frog/minfrog » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("dart:coreimpl"); 5 #library("dart:coreimpl");
6 6
7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); 7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart");
8 #source("../../corelib/src/implementation/duration_implementation.dart"); 8 #source("../../corelib/src/implementation/duration_implementation.dart");
9 #source("../../corelib/src/implementation/exceptions.dart"); 9 #source("../../corelib/src/implementation/exceptions.dart");
10 #source("../../corelib/src/implementation/future_implementation.dart"); 10 #source("../../corelib/src/implementation/future_implementation.dart");
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 args[1] = 0; 101 args[1] = 0;
102 for (var i = 0; i < length; i++) { 102 for (var i = 0; i < length; i++) {
103 args[i + 2] = initialValue; 103 args[i + 2] = initialValue;
104 } 104 }
105 this.splice.apply(this, args); 105 this.splice.apply(this, args);
106 """; 106 """;
107 107
108 // Collection<E> members: 108 // Collection<E> members:
109 void forEach(void f(E element)) native; 109 void forEach(void f(E element)) native;
110 Collection<E> filter(bool f(E element)) native; 110 Collection<E> filter(bool f(E element)) native;
111 Collection map(f(E element)) native;
111 bool every(bool f(E element)) native; 112 bool every(bool f(E element)) native;
112 bool some(bool f(E element)) native; 113 bool some(bool f(E element)) native;
113 bool isEmpty() => length == 0; 114 bool isEmpty() => length == 0;
114 115
115 // Iterable<E> members: 116 // Iterable<E> members:
116 Iterator<E> iterator() => new ListIterator(this); 117 Iterator<E> iterator() => new ListIterator(this);
117 } 118 }
118 119
119 // Iterator for lists. 120 // Iterator for lists.
120 class ListIterator<T> implements Iterator<T> { 121 class ListIterator<T> implements Iterator<T> {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } else if (isNaN()) { 466 } else if (isNaN()) {
466 if (other.isNaN()) { 467 if (other.isNaN()) {
467 return 0; 468 return 0;
468 } 469 }
469 return 1; 470 return 1;
470 } else { 471 } else {
471 return -1; 472 return -1;
472 } 473 }
473 } 474 }
474 } 475 }
OLDNEW
« no previous file with comments | « frog/lib/collections.dart ('k') | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698