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

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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 args[1] = 0; 83 args[1] = 0;
84 for (var i = 0; i < length; i++) { 84 for (var i = 0; i < length; i++) {
85 args[i + 2] = initialValue; 85 args[i + 2] = initialValue;
86 } 86 }
87 this.splice.apply(this, args); 87 this.splice.apply(this, args);
88 """; 88 """;
89 89
90 // Collection<E> members: 90 // Collection<E> members:
91 void forEach(void f(E element)) native; 91 void forEach(void f(E element)) native;
92 Collection<E> filter(bool f(E element)) native; 92 Collection<E> filter(bool f(E element)) native;
93 Collection map(f(E element)) native;
ahe 2012/01/05 22:36:54 Sigh.
93 bool every(bool f(E element)) native; 94 bool every(bool f(E element)) native;
94 bool some(bool f(E element)) native; 95 bool some(bool f(E element)) native;
95 bool isEmpty() => length == 0; 96 bool isEmpty() => length == 0;
96 97
97 // Iterable<E> members: 98 // Iterable<E> members:
98 Iterator<E> iterator() => new ListIterator(this); 99 Iterator<E> iterator() => new ListIterator(this);
99 } 100 }
100 101
101 // Iterator for lists. 102 // Iterator for lists.
102 class ListIterator<T> implements Iterator<T> { 103 class ListIterator<T> implements Iterator<T> {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } else if (isNaN()) { 448 } else if (isNaN()) {
448 if (other.isNaN()) { 449 if (other.isNaN()) {
449 return 0; 450 return 0;
450 } 451 }
451 return 1; 452 return 1;
452 } else { 453 } else {
453 return -1; 454 return -1;
454 } 455 }
455 } 456 }
456 } 457 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698