Program Builder
This class provides a DSL to build initial-style programs, given the type of basic actions or instructions.
The type arguments are a bit tricky to use, due to the restrictions Kotlin's type system:
To create generic utilities over any program, you should use a completely polymorphic
ProgramBuilder<Action, Result>as the extension receiver.For each particular action you usually want to instantiate ProgramBuilder using
<Action<A>, A>everywhere it appears. We highly recommend to create atypealiasfor it.
Functions
Record the execution of an action which consumes a value of type R.
Record the execution of an action which consumes a value of type R, and requires an additional argument of type A.
Record the execution of an action which consumes a value of type R, and requires additional arguments of types A and B.
Record the execution of an action which doesn't consume any value.
Record the execution of an action which doesn't consume any value, and requires an additional argument of type A.
Record the execution of an action which doesn't consume any value, and requires additional arguments of types A and B.