SortedNList can be used to get the first n sorted elements of a longer list. more efficient alternative to list.copy.sort.keep(n);
First code examples: