transform
Modify each element in a TArray by applying f.
import arrow.fx.stm.TArray
import arrow.fx.stm.atomically
suspend fun main() {
//sampleStart
val tarr = TArray.new(size = 10, 2)
val result = atomically {
tarr.transform { it + 1 }
}
//sampleEnd
println("Result $result")
}
Content copied to clipboard
This function never retries.