How to generate all permutations and combinations with/without replacement for distinct items and non distinct items (multisets)
R: Permutations and combinations with/without replacement and for distinct/non-distinct items/multiset