Devanshu Vaidya
02/22/2024, 7:27 PMmap[key] = map.getOrPut(key){ defaultValue} + someOperation
2. map[key] = map[key]?.let{ it -> someOperation} ?: defaultValue
3. if(!map.contains(key)) { map.put(key, value) }
CLOVIS
02/23/2024, 4:13 PMsomeOperation
? Where did it go in the last one?Devanshu Vaidya
02/23/2024, 4:25 PMAdam S
02/24/2024, 11:56 AMDevanshu Vaidya
02/24/2024, 11:59 AM