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

Side by Side Diff: tools/dom/src/WrappedList.dart

Issue 13945009: Make default argument to Iterable.join be "". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 | « tools/dom/src/CssClassSet.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.dom.html; 5 part of dart.dom.html;
6 6
7 /** 7 /**
8 * A list which just wraps another list, for either intercepting list calls or 8 * A list which just wraps another list, for either intercepting list calls or
9 * retyping the list (for example, from List<A> to List<B> where B extends A). 9 * retyping the list (for example, from List<A> to List<B> where B extends A).
10 */ 10 */
(...skipping 17 matching lines...) Expand all
28 void forEach(void f(E element)) { _list.forEach(f); } 28 void forEach(void f(E element)) { _list.forEach(f); }
29 29
30 dynamic reduce(initialValue, combine(previousValue, E element)) => 30 dynamic reduce(initialValue, combine(previousValue, E element)) =>
31 _list.reduce(initialValue, combine); 31 _list.reduce(initialValue, combine);
32 32
33 dynamic fold(initialValue, combine(previousValue, E element)) => 33 dynamic fold(initialValue, combine(previousValue, E element)) =>
34 _list.fold(initialValue, combine); 34 _list.fold(initialValue, combine);
35 35
36 bool every(bool f(E element)) => _list.every(f); 36 bool every(bool f(E element)) => _list.every(f);
37 37
38 String join([String separator]) => _list.join(separator); 38 String join([String separator = ""]) => _list.join(separator);
39 39
40 bool any(bool f(E element)) => _list.any(f); 40 bool any(bool f(E element)) => _list.any(f);
41 41
42 List<E> toList({ bool growable: true }) => 42 List<E> toList({ bool growable: true }) =>
43 new List.from(_list, growable: growable); 43 new List.from(_list, growable: growable);
44 44
45 Set<E> toSet() => _list.toSet(); 45 Set<E> toSet() => _list.toSet();
46 46
47 int get length => _list.length; 47 int get length => _list.length;
48 48
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Iterator _iterator; 147 Iterator _iterator;
148 148
149 _WrappedIterator(this._iterator); 149 _WrappedIterator(this._iterator);
150 150
151 bool moveNext() { 151 bool moveNext() {
152 return _iterator.moveNext(); 152 return _iterator.moveNext();
153 } 153 }
154 154
155 E get current => _iterator.current; 155 E get current => _iterator.current;
156 } 156 }
OLDNEW
« no previous file with comments | « tools/dom/src/CssClassSet.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698