Skip to content

oolong / oolong.random / nextInt

nextInt

(common) fun <Msg :Any> nextInt(msg: suspend CoroutineScope.(Int) -> Msg):Effect<Msg> (source) fun <Msg :Any> nextInt(until:Int, msg: suspend CoroutineScope.(Int) -> Msg):Effect<Msg> (source) fun <Msg :Any> nextInt(from:Int, until:Int, msg: suspend CoroutineScope.(Int) -> Msg):Effect<Msg> (source) fun <Msg :Any> nextInt(range:IntRange, msg: suspend CoroutineScope.(Int) -> Msg):Effect<Msg> (source)

Call Random.nextInt with a mapping of Int to Msg.

Parameters

msg - map function of Int to Msg

Return Effect of Msg for the generated Int