Refactored "selsort" to work with loop/recur.