Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index e7c4bee5b9b9f28652adcc711b2e4d5d1dcff822..ae7fded10242c94acdd8345d6b1283936e54d403 100644 |
--- a/runtime/lib/array.dart |
+++ b/runtime/lib/array.dart |
@@ -98,10 +98,12 @@ class _ObjectArray<E> implements List<E> { |
return IterableMixinWorkaround.joinList(this, separator); |
} |
- List mappedBy(f(E element)) { |
+ Iterable map(f(E element)) { |
floitsch
2013/01/30 14:48:44
map should return an iterable right away (since th
Lasse Reichstein Nielsen
2013/01/30 16:58:01
Do you mean that map should return an element that
Lasse Reichstein Nielsen
2013/01/31 11:33:49
Ok, changed all List.mappedBy implementations to r
|
return IterableMixinWorkaround.mappedByList(this, f); |
} |
+ Iterable mappedBy(f(E element)) => map(f); |
+ |
reduce(initialValue, combine(previousValue, E element)) { |
return IterableMixinWorkaround.reduce(this, initialValue, combine); |
} |
@@ -110,7 +112,7 @@ class _ObjectArray<E> implements List<E> { |
return IterableMixinWorkaround.where(this, f); |
} |
- List<E> take(int n) { |
+ Iterable<E> take(int n) { |
return IterableMixinWorkaround.takeList(this, n); |
} |
@@ -118,7 +120,7 @@ class _ObjectArray<E> implements List<E> { |
return IterableMixinWorkaround.takeWhile(this, test); |
} |
- List<E> skip(int n) { |
+ Iterable<E> skip(int n) { |
return IterableMixinWorkaround.skipList(this, n); |
} |
@@ -324,10 +326,12 @@ class _ImmutableArray<E> implements List<E> { |
IterableMixinWorkaround.forEach(this, f); |
} |
- List mappedBy(f(E element)) { |
+ Iterable map(f(E element)) { |
floitsch
2013/01/30 14:48:44
ditto.
Lasse Reichstein Nielsen
2013/01/31 11:33:49
Done.
|
return IterableMixinWorkaround.mappedByList(this, f); |
} |
+ Iterable mappedBy(f(E element)) => map(f); |
+ |
String join([String separator]) { |
return IterableMixinWorkaround.joinList(this, separator); |
} |
@@ -340,7 +344,7 @@ class _ImmutableArray<E> implements List<E> { |
return IterableMixinWorkaround.where(this, f); |
} |
- List<E> take(int n) { |
+ Iterable<E> take(int n) { |
return IterableMixinWorkaround.takeList(this, n); |
} |
@@ -348,7 +352,7 @@ class _ImmutableArray<E> implements List<E> { |
return IterableMixinWorkaround.takeWhile(this, test); |
} |
- List<E> skip(int n) { |
+ Iterable<E> skip(int n) { |
return IterableMixinWorkaround.skipList(this, n); |
} |