sreich
08/16/2022, 6:15 PMval opList = operations.computeIfAbsent(
basePath
) { key: String? -> ArrayList() }
Casey Brooks
08/16/2022, 6:19 PMmap.getOrPut(key) { value }
is the Kotlin version of that function, which is available on non-JVM targets, too (unlike computeIfAbsent
)ephemient
08/16/2022, 6:19 PMgetOrPut
has different locking guarantees than computeIfAbsent
, if that matters to yousreich
08/16/2022, 6:28 PM