| Index: sdk/lib/async/stream.dart
|
| diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
|
| index 759f9c7474391c0dbc13aadc3c52b158223e0429..38ace6dab4daa9a182908c72b7d38e446710cefc 100644
|
| --- a/sdk/lib/async/stream.dart
|
| +++ b/sdk/lib/async/stream.dart
|
| @@ -249,8 +249,18 @@ abstract class Stream<T> {
|
| return streamTransformer.bind(this);
|
| }
|
|
|
| - /** Reduces a sequence of values by repeatedly applying [combine]. */
|
| + /**
|
| + * Reduces a sequence of values by repeatedly applying [combine].
|
| + *
|
| + * *WARNING UPCOMING API-CHANGE*: This method will be changed so that
|
| + * it doesn't take an initial value. Use [fold] instead.
|
| + */
|
| Future reduce(var initialValue, combine(var previous, T element)) {
|
| + return fold(initialValue, combine);
|
| + }
|
| +
|
| + /** Reduces a sequence of values by repeatedly applying [combine]. */
|
| + Future fold(var initialValue, combine(var previous, T element)) {
|
| _FutureImpl result = new _FutureImpl();
|
| var value = initialValue;
|
| StreamSubscription subscription;
|
|
|