dankogai / js-combinatorics

power set, combination, permutation and more in JavaScript
MIT License
742 stars 97 forks source link

permutations in pairs #58

Closed stoplion closed 5 years ago

stoplion commented 5 years ago

Is there a way for this library to handle permutations in pairs?

const collection = ['a', 'b', 'c', 'd'];
const permutations = Combinatorics.permutation(collection, 2);
a b
a c
a d
b a
b c
......
stoplion commented 5 years ago

ok looks like it does work