distinct method

  1. @useResult
KtList<T> distinct()

Returns a list containing only distinct elements from the given collection.

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

Implementation

@useResult
KtList<T> distinct() => KtIterableExtensions<T>(toMutableSet()).toList();