fileability/mutton — Issue #5: Implement uniquedBy using a sort
Author: fileability
Created: 2012-03-10 01:11:30+00:00
State: open
Labels: enhancement

uniquedBy can be implement in O(n log n) time by

1. Sort the array by first using the given `eq` binary predicate, otherwise falling back to object addresses. Make sure to use a stable sort.
2. Loop over the sorted array. For each "run" of equal elements (as determined by `eq`), yield the first element.