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

Unified Diff: src/site/articles/using-future-based-apis/code/example5.dart

Issue 99503002: appropriating Shailen's excellent Futures intro into tutorial (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years 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: src/site/articles/using-future-based-apis/code/example5.dart
diff --git a/src/site/articles/using-future-based-apis/code/example5.dart b/src/site/articles/using-future-based-apis/code/example5.dart
deleted file mode 100644
index 56563372de2b1f2fd2612bdaf1b4d68a48b51837..0000000000000000000000000000000000000000
--- a/src/site/articles/using-future-based-apis/code/example5.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-import 'dart:io';
-import 'dart:async';
-
-void main() {
- Future.wait([expensiveA(), expensiveB(), expensiveC()])
- .then((List responses) => chooseBestResponse(responses))
- .catchError((e) => handleError(e));
-}
-
-Future expensiveA() => new Future.value('from expensiveA');
-Future expensiveB() => new Future.value('from expensiveB');
-Future expensiveC() => new Future.value('from expensiveC');
-
-doSomethingWith(value) {
- print(value);
-}
-
-chooseBestResponse(List responses) {
- print(responses[1]);
-}
-
-handleError(e) {
- print('error handled');
-}

Powered by Google App Engine
This is Rietveld 408576698