exercise 14-1: comparison function that operates on Prt<Core>