| Index: runtime/lib/array.dart
|
| diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
|
| index 9980d5da6ff4edbf18a0b52a7de3afc0ead7cf5e..15d3219910bbda047ca532167fd348aac57f197b 100644
|
| --- a/runtime/lib/array.dart
|
| +++ b/runtime/lib/array.dart
|
| @@ -88,6 +88,11 @@ class ObjectArray<E> implements List<E> {
|
| return Collections.map(this, new GrowableObjectArray.withCapacity(length), f);
|
| }
|
|
|
| + Dynamic reduce(Dynamic initialValue,
|
| + Dynamic combine(Dynamic previousValue, E element)) {
|
| + return Collections.reduce(this, initialValue, combine);
|
| + }
|
| +
|
| Collection<E> filter(bool f(E element)) {
|
| return Collections.filter(this, new GrowableObjectArray<E>(), f);
|
| }
|
| @@ -220,6 +225,11 @@ class ImmutableArray<E> implements List<E> {
|
| return Collections.map(this, new GrowableObjectArray.withCapacity(length), f);
|
| }
|
|
|
| + Dynamic reduce(Dynamic initialValue,
|
| + Dynamic combine(Dynamic previousValue, E element)) {
|
| + return Collections.reduce(this, initialValue, combine);
|
| + }
|
| +
|
| Collection<E> filter(bool f(E element)) {
|
| return Collections.filter(this, new GrowableObjectArray<E>(), f);
|
| }
|
|
|