followedBy method

Iterable<E> followedBy (
  1. Iterable<E> other
)

Returns the lazy concatenation of this iterable and other.

The returned iterable will provide the same elements as this iterable, and, after that, the elements of other, in the same order as in the original iterables.

Implementation

Iterable<E> followedBy(Iterable<E> other) {
  var self = this; // TODO(lrn): Remove when we can promote `this`.
  if (self is EfficientLengthIterable<E>) {
    return FollowedByIterable<E>.firstEfficient(self, other);
  }
  return FollowedByIterable<E>(this, other);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-core/Iterable/followedBy.html