| Index: corelib/src/implementation/collections.dart
|
| diff --git a/corelib/src/implementation/collections.dart b/corelib/src/implementation/collections.dart
|
| index 462d33af2a703382ecf34f320b5b8d8ca1a0913a..7786d3d364f1457d4361282fb304d47ad4a1b4d3 100644
|
| --- a/corelib/src/implementation/collections.dart
|
| +++ b/corelib/src/implementation/collections.dart
|
| @@ -35,6 +35,15 @@ class Collections {
|
| return destination;
|
| }
|
|
|
| + static Dynamic reduce(Iterable iterable,
|
| + Dynamic initialValue,
|
| + Dynamic combine(Dynamic previousValue, element)) {
|
| + for (final element in iterable) {
|
| + initialValue = combine(initialValue, element);
|
| + }
|
| + return initialValue;
|
| + }
|
| +
|
| static List filter(Iterable source, List destination, bool f(o)) {
|
| for (final e in source) {
|
| if (f(e)) destination.add(e);
|
|
|