Generalising sorting into SortableCollection