I hereby claim:
- I am stupenrose on github.
- I am stupenrose (https://keybase.io/stupenrose) on keybase.
- I have a public key ASCZ9kTEELNdtX_n9rfeIUxgDltTm8_uFhEk9m-Wieb6Hwo
To claim this, I am signing this object:
object Permutator { | |
/** | |
* http://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations | |
*/ | |
def permutate[T](parts:List[T])(implicit cmp: Ordering[T]):Stream[Seq[T]] = { | |
//sorting the sequence in (weakly) increasing order (which gives its lexicographically minimal permutation) | |
val start = parts.sorted | |
def remainder(parts:List[T]):Stream[Seq[T]] = { |
I hereby claim:
To claim this, I am signing this object: