Skip to main content

simple/
simple.rs

1use permutation_iterator::Permutor;
2
3fn main() {
4    let max = 10;
5
6    // Since we don't pass in a key we will get a random permutation every time we run this.
7    // Try it out!
8    let permutor = Permutor::new(max);
9
10    for (index, permuted) in permutor.enumerate() {
11        println!("{} -> {}", index, permuted);
12    }
13}