| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 Iterable expand(Iterable f(E element)) => _list.expand(f); | 24 Iterable expand(Iterable f(E element)) => _list.expand(f); |
| 25 | 25 |
| 26 bool contains(E element) => _list.contains(element); | 26 bool contains(E element) => _list.contains(element); |
| 27 | 27 |
| 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)) => |
| 34 _list.fold(initialValue, combine); |
| 35 |
| 33 bool every(bool f(E element)) => _list.every(f); | 36 bool every(bool f(E element)) => _list.every(f); |
| 34 | 37 |
| 35 String join([String separator]) => _list.join(separator); | 38 String join([String separator]) => _list.join(separator); |
| 36 | 39 |
| 37 bool any(bool f(E element)) => _list.any(f); | 40 bool any(bool f(E element)) => _list.any(f); |
| 38 | 41 |
| 39 List<E> toList({ bool growable: true }) => | 42 List<E> toList({ bool growable: true }) => |
| 40 new List.from(_list, growable: growable); | 43 new List.from(_list, growable: growable); |
| 41 | 44 |
| 42 Set<E> toSet() => _list.toSet(); | 45 Set<E> toSet() => _list.toSet(); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 Iterator _iterator; | 140 Iterator _iterator; |
| 138 | 141 |
| 139 _WrappedIterator(this._iterator); | 142 _WrappedIterator(this._iterator); |
| 140 | 143 |
| 141 bool moveNext() { | 144 bool moveNext() { |
| 142 return _iterator.moveNext(); | 145 return _iterator.moveNext(); |
| 143 } | 146 } |
| 144 | 147 |
| 145 E get current => _iterator.current; | 148 E get current => _iterator.current; |
| 146 } | 149 } |
| OLD | NEW |