insert
Add a key value pair to the map
import arrow.fx.stm.TMap
import arrow.fx.stm.atomically
suspend fun main() {
  //sampleStart
  val tmap = TMap.new<Int, String>()
  atomically {
    tmap.insert(10, "Hello")
  }
  //sampleEnd
}Content copied to clipboard
Adds an element to 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")
  }
  //sampleEnd
}Content copied to clipboard