remove

open fun <K, V> TMap<K, V>.remove(k: K)(source)

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
}

open fun <A> TSet<A>.remove(a: A)(source)

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
}