Index: sdk/lib/collection/collections.dart |
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart |
index f9e83eed8318f1e96d11b4265bf21b888b88a9e6..0c45e21d4250f85f4e04110279d4fb89403f8e76 100644 |
--- a/sdk/lib/collection/collections.dart |
+++ b/sdk/lib/collection/collections.dart |
@@ -313,12 +313,18 @@ class IterableMixinWorkaround { |
return new WhereIterable(iterable, f); |
} |
+ static Iterable map(Iterable iterable, f(var element)) { |
+ return new MappedIterable(iterable, f); |
+ } |
+ |
static List mappedByList(List list, f(var element)) { |
+ // This is currently a List as well as an Iterable. |
return new MappedList(list, f); |
} |
- static List takeList(List list, int n) { |
+ static Iterable takeList(List list, int n) { |
// The generic type is currently lost. It will be fixed with mixins. |
+ // This is currently a List as well as an Iterable. |
return new ListView(list, 0, n); |
} |
@@ -327,8 +333,9 @@ class IterableMixinWorkaround { |
return new TakeWhileIterable(iterable, test); |
} |
- static List skipList(List list, int n) { |
+ static Iterable skipList(List list, int n) { |
// The generic type is currently lost. It will be fixed with mixins. |
+ // This is currently a List as well as an Iterable. |
return new ListView(list, n, null); |
} |
@@ -443,7 +450,7 @@ class Collections { |
=> IterableMixinWorkaround.mappedByList(list, f); |
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ |
- static List takeList(List list, int n) |
+ static Iterable takeList(List list, int n) |
=> IterableMixinWorkaround.takeList(list, n); |
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ |
@@ -451,7 +458,7 @@ class Collections { |
=> IterableMixinWorkaround.takeWhile(iterable, test); |
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ |
- static List skipList(List list, int n) |
+ static Iterable skipList(List list, int n) |
=> IterableMixinWorkaround.skipList(list, n); |
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ |