concat8 method

Iterable<T> concat8(
  1. Iterable<T> c1,
  2. Iterable<T> c2,
  3. Iterable<T> c3,
  4. Iterable<T> c4,
  5. Iterable<T> c5,
  6. Iterable<T> c6,
  7. Iterable<T> c7,
  8. Iterable<T> c8,
)

Concatenates this iterable and eight another iterables.

Appends the values of eight given Iterables to the end of this iterable, resulting in an iterable that is the concatenation of all of them.

Example:

void main() {
  final list = [0, 1];
  final result = list.concat8(
    [2, 3],
    [4, 5],
    [6, 7],
    [8, 9],
    [10, 11],
    [12, 13],
    [14, 15],
    [16, 17],
  );

  // Result: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
}

Implementation

Iterable<T> concat8(
  Iterable<T> c1,
  Iterable<T> c2,
  Iterable<T> c3,
  Iterable<T> c4,
  Iterable<T> c5,
  Iterable<T> c6,
  Iterable<T> c7,
  Iterable<T> c8,
) {
  return followedBy(c1)
      .followedBy(c2)
      .followedBy(c3)
      .followedBy(c4)
      .followedBy(c5)
      .followedBy(c6)
      .followedBy(c7)
      .followedBy(c8);
}