Chromium Code Reviews| Index: sdk/lib/collection/list.dart |
| diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart |
| index 8b6713aeb839bf99fc87ddeba90a52b0a8388c51..b81b8dd7c11fc2180336f577443e4a92fe3b66d7 100644 |
| --- a/sdk/lib/collection/list.dart |
| +++ b/sdk/lib/collection/list.dart |
| @@ -175,11 +175,11 @@ abstract class ListMixin<E> implements List<E> { |
| Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test); |
| - Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) => |
| - new MappedListIterable/*<E, T>*/(this, f); |
| + Iterable<T> map<T>(T f(E element)) => |
| + new MappedListIterable<E, T>(this, f); |
| - Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element)) => |
| - new ExpandIterable<E, dynamic/*=T*/>(this, f); |
| + Iterable<T> expand<T>(Iterable<T> f(E element)) => |
| + new ExpandIterable<E, T>(this, f); |
| E reduce(E combine(E previousValue, E element)) { |
| int length = this.length; |
| @@ -194,8 +194,8 @@ abstract class ListMixin<E> implements List<E> { |
| return value; |
| } |
| - dynamic/*=T*/ fold/*<T>*/(var/*=T*/ initialValue, |
| - dynamic/*=T*/ combine(var/*=T*/ previousValue, E element)) { |
| + T fold<T>(T initialValue, |
|
floitsch
2016/12/13 12:42:25
Does this fit on one line?
Lasse Reichstein Nielsen
2016/12/13 14:28:03
Done.
|
| + T combine(T previousValue, E element)) { |
| var value = initialValue; |
| int length = this.length; |
| for (int i = 0; i < length; i++) { |
| @@ -371,7 +371,7 @@ abstract class ListMixin<E> implements List<E> { |
| List<E> otherList; |
| int otherStart; |
| // TODO(floitsch): Make this accept more. |
| - if (iterable is List/*<E>*/) { |
| + if (iterable is List<E>) { |
| otherList = iterable; |
| otherStart = skipCount; |
| } else { |