First Working version. Eyeball testing seems to work up to 5! Cleaned up further to remove unused swap function, and to return the base case without all the generic code used in the recursive cases.