cartesian<T2> method
Generates the cartesian product of this iterable and other
.
Generates all the elements in the cartesian product between this
and the provided other
iterable. The resulting iterable will consist
of an iterable of Tuple2
with each combination of each element from this
iterable and each element from other
.
Implementation
Iterable<Tuple2<T, T2>> cartesian<T2>(Iterable<T2> other) sync* {
for (var a in this) {
for (var b in other) {
yield Tuple2(a, b);
}
}
}