anchor.diff:    // ------------------------------------------------------------------
     // Internal helper methods.
   
  -  /// Returns an error for when a request is made after cancel.
  -  ///
  -  /// Returns a [StateError] with a message saying that either
  -  /// [cancel] or [rest] have already been called.
  -  Error _failClosed() {
  -    return StateError('Already cancelled');
  +  /// Throws an error if [cancel] or [rest] have already been called.
  +  void _checkNotClosed() {
  +    if (_isClosed) throw StateError('Already cancelled');
     }
   
     /// Adds a new request to the queue.
  
positive.code:     }
    }
  
    /// Asks if the stream has any more events.
    ///
    /// Returns a future that completes with `true` if the stream has any
    /// more events, whether data or error.
  
negative.code:   /// Another alternative is to use `take(1)` which returns either zero or
    /// one events.
    Future<bool> get hasNext {
      _checkNotClosed();
      var hasNextRequest = _HasNextRequest<T>();
      _addRequest(hasNextRequest);
      return hasNextRequest.future;
    }
  
    /// Look at the next [count] data events without consuming them.
  