var tracker: Int val list = listOf(listOf(1,2,3),listOf(1,2,3,4)) list.mapFirstNotNull { it -> it.firstOrNull { it == 1; tracker = it} }