Change the way of using function, we now use the Predicate function for
selection and sort.