erlang sorting algorithms