program

fun <A> program(block: suspend ProgramScope.() -> A): Program<A>(source)

Build a Program in direct style: .bind() each sub-program, or each effect, instead of chaining flatMap. The block is captured, not run — each interpretation forces it afresh, so program{} values are pure, replayable descriptions that can be interpreted any number of times, under different handler stacks.