distinctBy

inline fun <T, K> Array<out T>.distinctBy(
    selector: (T) -> K
): List<T>
(source)
inline fun <K> ByteArray.distinctBy(
    selector: (Byte) -> K
): List<Byte>
(source)
inline fun <K> ShortArray.distinctBy(
    selector: (Short) -> K
): List<Short>
(source)
inline fun <K> IntArray.distinctBy(
    selector: (Int) -> K
): List<Int>
(source)
inline fun <K> LongArray.distinctBy(
    selector: (Long) -> K
): List<Long>
(source)
inline fun <K> FloatArray.distinctBy(
    selector: (Float) -> K
): List<Float>
(source)
inline fun <K> DoubleArray.distinctBy(
    selector: (Double) -> K
): List<Double>
(source)
inline fun <K> BooleanArray.distinctBy(
    selector: (Boolean) -> K
): List<Boolean>
(source)
inline fun <K> CharArray.distinctBy(
    selector: (Char) -> K
): List<Char>
(source)

Returns a list containing only elements from the given array having distinct keys returned by the given selector function.

The elements in the resulting list are in the same order as they were in the source array.

inline fun <T, K> Iterable<T>.distinctBy(
    selector: (T) -> K
): List<T>
(source)

Returns a list containing only elements from the given collection having distinct keys returned by the given selector function.

The elements in the resulting list are in the same order as they were in the source collection.