mutableSetOf
Returns a new MutableSet with the given elements. Elements of the set are iterated in the order they were specified.
Since Kotlin
1.0Samples
import kotlin.test.*
fun main() {
//sampleStart
val set = mutableSetOf(1, 2, 3)
println(set) // [1, 2, 3]
set.remove(3)
set += listOf(4, 5)
println(set) // [1, 2, 4, 5]
//sampleEnd
}