Day 2: sort with function passed in.