(sorry, sent this directly to Graydon instead of to the list) On Sun, Feb 27, 2011 at 10:19 PM, Graydon Hoare <[email protected]> wrote: > Yeah. You want vec[mutable int]. We'll probably wind up with a 'swap' > primitive at some point down the line when unique ownership and move > semantics are more thoroughly worked out. Thanks. To be more concrete, I was trying to write an iterator to generate all permutations of a vec: iter combinations[T](&vec[T] els) -> vec[T] by 1. Making a mutable copy of els 2. Performing a sequence of swaps on my copy 3. 'put'ting a copy of each one I have a feeling maybe I don't understand mutability now - in code like let int i = 0; i = i + 1; Why doesn't i have to be mutable int?
> No need for this. We have a clear conduct guideline about insulting and > baiting speech. Please refrain from it in the future. Noted. Pete _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
