cartesian3<T2, T3> method

Iterable<Tuple3<T, T2, T3>> cartesian3<T2, T3>(
  1. Iterable<T2> o2,
  2. Iterable<T3> o3
)

Generates the cartesian product of this iterable and two other iterables.

Generates all the elements in the cartesian product between this and the provided iterables. The resulting iterable will consist of an iterable of Tuple3 with each combination of each element from this iterable and each element from each other iterable.

Implementation

Iterable<Tuple3<T, T2, T3>> cartesian3<T2, T3>(
  Iterable<T2> o2,
  Iterable<T3> o3,
) sync* {
  for (var a in this) {
    for (var b in o2) {
      for (var c in o3) {
        yield Tuple3(a, b, c);
      }
    }
  }
}