title: Sorting a list in Prolog
body: <p>Prolog has a unique way of handling things, especially since practically every operation involves recursion of one sort or another.</p>
  
  <p>One of the classic examples every language has is sorting a list of integers into ascending order.</p>
  
  <p>What is an optimal way (without using too many built-in predicates, which precludes a sort/2 predicate, of course) to sort a random list of integers?</p>