permutator
nikhedonia opened this issue · comments
Gaetano Checinski commented
implement a permutator which yields all permutations of a given list
for( permutation of [1,2,3]::permutate() ){
console.log(permutation);
}
//would print [1,2,3] , [2,1,3] , [2,3,1], [3,2,1] , [3,1,2], [1,3,2]
Jussi Kalliokoski commented
👍 - I'd also like to see other combinatorics from python's itertools in Trine.
Gaetano Checinski commented
me too; itertools is a nice source of inspiration