StatefulChain
class StatefulChain<S, out R>(state: S, seed: S.() -> R, forkState: (S) -> S, gen: suspend S.(R) -> R) : Chain<R> (source)
A chain with possibly mutable state. The state must not be changed outside the chain. Two chins should never share the state.
Parameters
S
the state of the chain.
forkState
the function to copy current state without modifying it.
Constructors
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T, R> Flow<T>.mapParallel(dispatcher: CoroutineDispatcher = Dispatchers.Default, crossinline transform: suspend (T) -> R): Flow<R>
Link copied to clipboard