map To Set
inline fun <T, R> Iterable<T>.mapToSet(destination: MutableSet<R> = mutableSetOf(), transform: (T) -> R): MutableSet<R>
Content copied to clipboard
Transform the receiver via the supplied function and collect the results into an optionally provided set. Answer the result set.
Return
The resultant MutableSet.
Parameters
T
The element type of the incoming Iterable.
R
The element type of the outgoing Set.
destination
The destination MutableSet. Defaults to mutableSetOf.
transform
The function to map keys to values.