cartesian_product
Returns every pair (x, y) with x from a and y from b, in row-major order.
For more than two inputs, nest the calls.
Import
Section titled “Import”Cargo feature array (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
a | &[A] | The first slice. |
b | &[B] | The second slice. |
Returns
Section titled “Returns”Vec<(A, B)>
