From http://stackoverflow.com/questions/8137082/scala-function-to-get-all-sorted-subsets-of-size-k