arrow-fx / arrow.fx / MVarFactory / just
abstract fun <A> just(a: A): Kind<F,
MVar
<F, A>>
Builds a MVar with a value of type A.
import arrow.fx.*
import arrow.fx.extensions.io.async.async
fun main(args: Array<String>) {
//sampleStart
val mvarPartial: MVarFactory<ForIO> = MVar.factoryUncancellable(IO.async())
val intVar: IOOf<MVar<ForIO, Int>> = mvarPartial.just(5)
//sampleEnd
}
Do you like Arrow?
✖