typedef for comparator functions
insertionsort uses comparator callback