sort/2

sort(+ L,- S)* is iso

Unifies S with the list obtained by sorting L and merging identical (in the sense of ==) elements.