#yield #create #permutations #iterator #values #eg #list

simple_permutator

Simple library to create permutations of a list of values. Eg Permutator::new(&[1,2,3]) creates an iterator that yields [1,2,3], [2,1,3], [2,3,1], [1,3,2], [3,1,2], [3,2,1]

3 unstable releases

0.2.1 Mar 2, 2022
0.2.0 Mar 1, 2022
0.1.0 Mar 1, 2022

#1688 in Algorithms

MIT/Apache

6KB
105 lines

permutations

Simple library to create permutations of values. Permutator::new(&[1,2,3]) creates an iterator that yields [1,2,3], [2,1,3], [2,3,1], [1,3,2], [3,1,2], [3,2,1].

No runtime deps