This post contains 18+ content. You can view it if you're over 18.
| function | availability |
|---|---|
::combinations(k) | ✅ exists |
::tuple_combinations() | ✅ exists |
::permutations(k) | ✅ exists |
::tuple_permutations() | ❌ doesn't exist and it's the one i want to use |
what I want to write:
for (a,b) in items.iter().tuple_permutations() {
...
what I am currently burdened with writing:
for ab in items.iter().permutations(2) {
let a = ab[0];
let b = ab[1];
...