anchor.diff:     * Wait for all the given futures to complete and collect their values.
      *
      * Returns a future which will complete once all the futures in a list are
  -   * complete. If any of the futures in the list completes with an exception,
  -   * the resulting future also completes with an exception. Otherwise the value
  +   * complete. If any of the futures in the list completes with an error,
  +   * the resulting future also completes with an error. Otherwise the value
      * of the returned future will be a list of all the values that were produced.
      */
     static Future<List> wait(Iterable<Future> futures) {
  
positive.code:    * Completing a future with an error indicates that an exception was thrown
     * while trying to produce a value.
     *
     * The argument [exception] should not be [:null:].
     *
     * If [exception] is an [AsyncError], it is used directly as the error
     * message sent to the future's listeners, and [stackTrace] is ignored.
  
negative.code: part of dart.async;
  
  /**
   * A [Future] represents a delayed computation. It is used to obtain a not-yet
   * available value, or error, sometime in the future.  Receivers of a
   * [Future] can register callbacks that handle the value or error once it is
   * available. For example:
   *
   *     Future<int> future = getFuture();
   *     future.then((value) => handleValue(value))
   *           .catchError((error) => handleError(error));
   *
   * A [Future] can be completed in two ways: with a value ("the future succeeds")
   * or with an error ("the future fails"). Users can install callbacks for each
   * case. The result of registering a pair of callbacks is a new Future (the
   * "successor") which in turn is completed with the result of invoking the
   * corresponding callback. The successor is completed with an error if the
   * invoked callback throws. For example:
   *
   *     Future<int> successor = future.then((int value) {
   *         // Invoked when the future is completed with a value.
   *         return 42;  // The successor is completed with the value 42.
   *       },
   *       onError: (AsyncError e) {
   *         // Invoked when the future is completed with an error.
   *         if (canHandle(e)) {
   *           return 499;  // The successor is completed with the value 499.
   *         } else {
   *           throw e;  // The successor is completed with the error e.
   *         }
   *       });
   *
   * If a future does not have a successor but is completed with an error, it
   * forwards the error message to the global error-handler. This special casing
   * makes sure that no error is silently dropped. However, it also means that
   * error handlers should be installed early, so that they are present as soon
   * as a future is completed with an error. The following example demonstrates
   * this potential bug:
   *
   *     var future = getFuture();
   *     new Timer(5, (_) {
   *       // The error-handler is only attached 5ms after the future has been
   *       // received. If the future fails in the mean-time it will forward the
   *       // error to the global error-handler, even though there is code (just
   *       // below) to handle the error.
   *       future.then((value) { useValue(value); },
   *                   onError: (e) { handleError(e); });
   *     });
   *
   * In general we discourage registering the two callbacks at the same time, but
   * prefer to use [then] with one argument (the value handler), and to use
   * [catchError] for handling errors. The missing callbacks (the error-handler
   * for [then], and the value-handler for [catchError]), are automatically
   * configured to "forward" the value/error. Separating value and error-handling
   * into separate registration calls usually leads to code that is easier to
   * reason about. In fact it makes asynchronous code very similar to synchronous
   * code:
   *
   *     // Synchronous code.
   *     try {
   *       int value = foo();
   *       return bar(value);
   *     } catch (e) {
   *       return 499;
   *     }
   *
   *  Equivalent asynchronous code, based on futures:
   *
   *     Future<int> future = foo();  // foo now returns a future.
   *     future.then((int value) => bar(value))
   *           .catchError((e) => 499);
   *
   * Similar to the synchronous code, the error handler (registered with
   * [catchError]) is handling the errors for exceptions coming from calls to
   * 'foo', as well as 'bar'. This would not be the case if the error-handler was
   * registered at the same time as the value-handler.
   *
   * Futures can have more than one callback-pairs registered. Each successor is
   * treated independently and is handled as if it was the only successor.
   */
  // TODO(floitsch): document chaining.
  abstract class Future<T> {
    /**
     * A future whose value is available in the next event-loop iteration.
     *
     * See [Completer]s, for futures with values that are computed asynchronously.
     */
    factory Future.immediate(T value) => new _FutureImpl<T>.immediate(value);
  
    /**
     * A future that completes with an error in the next event-loop iteration.
     *
     * See [Completer]s, for futures with values that are computed asynchronously.
     */
    factory Future.immediateError(var error, [Object stackTrace]) {
      return new _FutureImpl<T>.immediateError(error, stackTrace);
    }
  