The Sorter transformation