[API Review] PriorityQueue APIs

A concern I have with adding a closure/KeyPath comparator is that PriorityQueue is not the only data structure that would benefit from this kind of feature. I think Set, OrderedSet, and (soon!) SortedSet would similarly benefit from being able to compare/hash on a projection of their element. It seems undesirable to have an alternate variant of all of these data structures.

2 Likes