 <h2><span>Implementation</span> </h2>
      <pre class="language-dart"><code class="language-dart">Future&lt;T&gt; elementAt(int index) {
  if (index is! int || index &lt; 0) throw new ArgumentError(index);
  _Future&lt;T&gt; future = new _Future&lt;T&gt;();
  StreamSubscription subscription;
  int elementIndex = 0;
  subscription = this.listen(
      (T value) {
        if (index == elementIndex) {
          _cancelAndValue(subscription, future, value);
          return;
        }
        elementIndex += 