remove
Remove a key value pair from a map
import arrow.fx.stm.TMap
import arrow.fx.stm.atomically
suspend fun main() {
//sampleStart
val tmap = TMap.new<Int, String>()
atomically {
tmap[1] = "Hello"
tmap.remove(1)
}
//sampleEnd
}
Content copied to clipboard
Remove an element from the set.
import arrow.fx.stm.TSet
import arrow.fx.stm.atomically
suspend fun main() {
//sampleStart
val tset = TSet.new<String>()
atomically {
tset.insert("Hello")
tset.remove("Hello")
}
//sampleEnd
}
Content copied to clipboard