I want reduce this code, merging `vidID` and `idM...
# getting-started
f
I want reduce this code, merging
vidID
and
idMissing
in a single variable.
Copy code
data class File22(val fileName: String, val vidID: Int = - 1)

val files22 = ..... // Intance of 'File22'

val vidID     = files22.map { it.vidID } // Array of Int e.g: [1,3,4,7]
val idMissing = vidID.filterIndexed { index, i -> !vidID.contains(index)} // Result: idMissing -> 2,5,6