Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: runtime/bin/process_patch.dart

Issue 13548002: Add Iterable.fold (and Stream.fold) which replace `reduce`. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 4893ceef04afc92d195c335c82e74f384033a3e1..4b49ebfa1cea3cc2150ae463b2d345c3c10d7521 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -299,7 +299,7 @@ Future<ProcessResult> _runNonInteractiveProcess(String path,
// Setup stdout handling.
Future<StringBuffer> stdout = p.stdout
.transform(new StringDecoder(stdoutEncoding))
- .reduce(
+ .fold(
new StringBuffer(),
(buf, data) {
buf.write(data);
@@ -308,7 +308,7 @@ Future<ProcessResult> _runNonInteractiveProcess(String path,
Future<StringBuffer> stderr = p.stderr
.transform(new StringDecoder(stderrEncoding))
- .reduce(
+ .fold(
new StringBuffer(),
(buf, data) {
buf.write(data);

Powered by Google App Engine
This is Rietveld 408576698