Added destructive sort function for lists.