concat method

Iterable<T> concat(
  1. Iterable<T> other
)

Concatenates this iterable and another iterables.

Appends the values of a given Iterable to the end of this iterable, resulting in an iterable that is the concatenation of both.

Example:

void main() {
  final list = [0, 1, 2];
  final result = list.concat([3, 4, 5]);

  // Result: [0, 1, 2, 3, 4, 5]
}

(This is a convenience method to maintain naming-consistency with its .NET LINQ equivalent. Internally it functions identically to followedBy.)

Implementation

Iterable<T> concat(Iterable<T> other) {
  return followedBy(other);
}