Does Kotlin allows us to use the code like this? ...
# announcements
a
Does Kotlin allows us to use the code like this?
Copy code
// numberList: 1, 2, 3, 4, 5, 6

numberList.contains(1,2,6)
k
no
Copy code
val numberList = listOf(1, 2, 3, 4, 5, 6)
	numberList.containsAll(listOf(1,2,6))
Copy code
fun <T> Collection<T>.containsAll(vararg items: T) = containsAll(items.asList())
Copy code
val numberList = listOf(1, 2, 3, 4, 5, 6)
numberList.containsAll(1, 2, 6)
like this it does, but not much point tbh
a
tbh = To be honest?
Because I am doing Tic Tac Toe.
To check the winner.