selection sort algorithm
functional selection and insertion sort + tests