Add function to sort things

With p as in 'put in order'.
Didn't change the help…