I tried `perm.slice_to(i + 1).mut_iter()` instead of `perm.mut_iter().take(i + 1)` and it's surprisly slower.

I can't see why peek will be faster that saving pred element as it will need to unwrap.