setOf
Returns a new read-only set with the given elements. Elements of the set are iterated in the order they were specified. The returned set is serializable (JVM).
fun <T> setOf(vararg elements: T): Set<T>(source)(source)
fun main() {
val colors = setOf("red", "green", "blue")
for (color in colors) {
println(color)
}
}