mapToSet
inline fun <C : Collection<T>, T, R> C.mapToSet(destination: MutableSet<R> = mutableSetOf(), transform: (T) -> R): Set<R>(source)
Transforms the elements of the receiver collection and adds the results to a set.
Receiver
The collection to be transformed.
Return
A set containing the transformed elements from the receiver collection.
Parameters
destination
The destination set where the transformed elements are placed. By default, it is an empty mutable set.
transform
A function that maps elements of the receiver collection to the output set.