nubBy package:filtrable

Delete all but the first copy of each element, with the given relation.