--- from: http://rosettacode.org/wiki/Permutations note: Discrete math