Skip to main content

Fork

val doA = WIO.pure(MyState(1)).autoNamed
val doB = WIO.pure(MyState(2)).autoNamed

val fork: WIO[MyState, Nothing, MyState] =
WIO
.fork[MyState]
.matchCondition(_.counter > 0, "Is counter positive?")(
onTrue = doA,
onFalse = doB,
)