cartesianSelect<T2, TResult> method
Iterable<TResult>
cartesianSelect<T2, TResult>(
- Iterable<
T2> other, - TResult selector(
- T element,
- T2 otherElement
Generates the cartesian product of this iterable and other
, returning an
iterable of mapped elements.
Generates all the elements in the cartesian product between this
and the provided other
iterable. Each combination of element from this
iterable and each element from other
will be passed to selector
to
generate the result.
Implementation
Iterable<TResult> cartesianSelect<T2, TResult>(
Iterable<T2> other,
TResult Function(T element, T2 otherElement) selector,
) sync* {
for (var a in this) {
for (var b in other) {
yield selector(a, b);
}
}
}