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

Unified Diff: samples/openglui/src/openglui_canvas_tests.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: Address comments. Created 7 years, 8 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
« no previous file with comments | « runtime/lib/typeddata.dart ('k') | samples/swarm/swarm_ui_lib/observable/observable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/openglui/src/openglui_canvas_tests.dart
diff --git a/samples/openglui/src/openglui_canvas_tests.dart b/samples/openglui/src/openglui_canvas_tests.dart
index 66c848590fd6dcfc0f21b7f21aecde31277d82d2..b9b394704b5abc4a7c08630624e7e5cae7353b89 100644
--- a/samples/openglui/src/openglui_canvas_tests.dart
+++ b/samples/openglui/src/openglui_canvas_tests.dart
@@ -1022,7 +1022,7 @@ class RayTracer {
+ (thing.surface.specular(pos) * scolor);
}
};
- return scene.lights.reduce(Color.defaultColor, addLight);
+ return scene.lights.fold(Color.defaultColor, addLight);
}
render(Scene scene, CanvasRenderingContext2D ctx, num screenWidth,
« no previous file with comments | « runtime/lib/typeddata.dart ('k') | samples/swarm/swarm_ui_lib/observable/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698