|(require dos)||package: dos|
Calls each process in ps (which is a cons-tree of process functions) with cur and expects that either (a) a new state or (b) the process will call dos-syscall and construct a new state. The resulting states are combined using +. Assumes that state?, +, and zero form a monoid, i.e., that states can be combined in any order and (+ a zero) is the same as a.
Calls k->state with the current continuation and expects it to return a state that will be delivered to dos-boot. Returns the cur state that dos-boot is called with if the continuation is included in dos-boot’s ps argument.
This function is useful for constructing arguments to dos-boot’s ps argument efficiently.
Runs the process p with the cur state and returns the state that it returns or constructs with dos-syscall.