List: reimplement partition, document sort_by and add permutations