Н
val fooList = mutableListOf<Foo>()вопрос: x каждый раз же будет разным или ответ будет кешироваться?
val x: Int
get() = fooList.map { it.bar }.sum()
Size: a a a
Н
val fooList = mutableListOf<Foo>()вопрос: x каждый раз же будет разным или ответ будет кешироваться?
val x: Int
get() = fooList.map { it.bar }.sum()
Н
Н
val fooList = mutableListOf<Foo>()вопрос: x каждый раз же будет разным или ответ будет кешироваться?
val x: Int
get() = fooList.map { it.bar }.sum()
Н
Н
AL
map.filterKeys { key -> droppedPrefixes.none { key.startsWith(it) } }
mutableMap.keys.removeIf { key -> droppedPrefixes.any { key.startsWith(it) } }
Н
Н
map.filterKeys { key -> droppedPrefixes.none { key.startsWith(it) } }
mutableMap.keys.removeIf { key -> droppedPrefixes.any { key.startsWith(it) } }
Н
map.filterKeys { key -> droppedPrefixes.none { key.startsWith(it) } }
mutableMap.keys.removeIf { key -> droppedPrefixes.any { key.startsWith(it) } }
AL
val droppedKeys = mutableMap.keys.filter { key -> droppedPrefixes.any { key.startsWith(it) } }
mutableMap.keys.removeAll(droppedKeys)
inline fun <K, V> MutableMap<K, V>.removeKeysIf(predicate: (K) -> Boolean) {
val each = keys.iterator()
while (each.hasNext()) {
if (predicate(each.next())) {
each.remove()
}
}
}
Н
Н
DA
AL
DA
AL
ch
АП
ch
АП