distinctByLaw

inline fun <T, K> Array<T>.distinctByLaw(selector: (T) -> K): List<T>