SimpleChain

class SimpleChain<out R>(gen: suspend () -> R) : Chain<R>

A simple chain of independent tokens. fork returns the same chain.

Constructors

SimpleChain
Link copied to clipboard
common
fun <out R> SimpleChain(gen: suspend () -> R)

Functions

collect
Link copied to clipboard
common
open suspend override fun collect(collector: FlowCollector<R>)
fork
Link copied to clipboard
common
open suspend override fun fork(): Chain<R>
Create a copy of current chain state.
next
Link copied to clipboard
common
open suspend override fun next(): R
Generate next value, changing state if needed

Sources

common source
Link copied to clipboard