pub fn permutations<'a, T: Copy>(
s1: &'a [T],
s2: &'a [T],
) -> impl Iterator<Item = ((T, T), (T, T))> + 'a
Available on crate feature
regression
only.Expand description
Unique permutations of two elements - an iterator of all the pairs of associated values in the slices.
This function will behave unexpectedly if s1
and s2
have different lengths.
Returns an iterator which yields O(n²)
items.