You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's too much effort to create a branch and pull request at this point, so I'll paste the code I've been using inline:
iter permute(elts: [@T]) -> [@T] {
if vec::is_not_empty(elts) {
for each i in uint::range(0u, vec::len(elts)) {
let rest = vec::slice(elts, 0u, i);
rest += vec::slice(elts, i + 1u, vec::len(elts));
for each permutation in permute(tmp) {
put [elts[i]] + permutation;
}
}
} else {
put [];
}
}
Activity
Add vec::permute to the standard library (rust-lang#1013)
Add vec::permute to the standard library (#1013)
mbrubeck commentedon Nov 3, 2011
This issue can be closed; it is fixed by #1121.
jdm commentedon Nov 3, 2011
.
Merge pull request rust-lang#1013 from servo/try_clone
Auto merge of rust-lang#8030 - WaffleLapkin:ignore_trait_assoc_types_…
Fix vector fmuladd (rust-lang#1013)
Switch from `doc(include)` to `doc = include_str!` (rust-lang#1013)
Merge rust-lang#1013
Merge pull request rust-lang#1013 from GuillaumeGomez/const-str-fixes