Chromium Code Reviews| Index: sdk/lib/internal/iterable.dart |
| diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart |
| index 73b3669f5fc84facba92303c9b344cafd9a58313..66897eb866cfd2ea5bb7e5406934329cf3025875 100644 |
| --- a/sdk/lib/internal/iterable.dart |
| +++ b/sdk/lib/internal/iterable.dart |
| @@ -172,8 +172,8 @@ abstract class ListIterable<E> extends EfficientLengthIterable<E> { |
| Iterable<E> where(bool test(E element)) => super.where(test); |
| - Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) => |
| - new MappedListIterable<E, dynamic/*=T*/ >(this, f); |
| + Iterable<T> map<T>(T f(E element)) => |
| + new MappedListIterable<E, T >(this, f); |
| E reduce(E combine(var value, E element)) { |
| int length = this.length; |
| @@ -189,9 +189,9 @@ abstract class ListIterable<E> extends EfficientLengthIterable<E> { |
| return value; |
| } |
| - /*=T*/ fold/*<T>*/( |
| - var/*=T*/ initialValue, /*=T*/ combine( |
| - var/*=T*/ previousValue, E element)) { |
| + T fold<T>( |
|
floitsch
2016/12/13 12:42:25
Merge lines.
Lasse Reichstein Nielsen
2016/12/13 14:28:03
Done.
|
| + T initialValue, T combine( |
| + T previousValue, E element)) { |
| var value = initialValue; |
| int length = this.length; |
| for (int i = 0; i < length; i++) { |
| @@ -428,8 +428,8 @@ class WhereIterable<E> extends Iterable<E> { |
| Iterator<E> get iterator => new WhereIterator<E>(_iterable.iterator, _f); |
| // Specialization of [Iterable.map] to non-EfficientLengthIterable. |
| - Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) => |
| - new MappedIterable<E, dynamic/*=T*/>._(this, f); |
| + Iterable<T> map<T>(T f(E element)) => |
| + new MappedIterable<E, T>._(this, f); |
| } |
| class WhereIterator<E> extends Iterator<E> { |
| @@ -720,15 +720,15 @@ class EmptyIterable<E> extends EfficientLengthIterable<E> { |
| Iterable<E> where(bool test(E element)) => this; |
| - Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) => const EmptyIterable(); |
| + Iterable<T> map<T>(T f(E element)) => const EmptyIterable(); |
| E reduce(E combine(E value, E element)) { |
| throw IterableElementError.noElement(); |
| } |
| - /*=T*/ fold/*<T>*/( |
| - var/*=T*/ initialValue, /*=T*/ combine( |
| - var/*=T*/ previousValue, E element)) { |
| + T fold<T>( |
|
floitsch
2016/12/13 12:42:25
merge lines.
Lasse Reichstein Nielsen
2016/12/13 14:28:03
Done.
|
| + T initialValue, T combine( |
| + T previousValue, E element)) { |
| return initialValue; |
| } |