pub fn first_classes<T, K>(x: &[T], key: impl Fn(T) -> K) -> Vec<u32>where T: Copy, K: Eq + Hash,
The first position of each item’s key in x, from one pass that records and reads each key together. Two items’ keys are equal exactly when the items match.
key
x