def Generation.run_with

bend-trace-context@0.2.0.0 · trace_context.bend:1464

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base

1464# Drive a generation from a caller's source, one word at a time
1465# (Draw.read), and hand back the source's final state with the result.
1466def Generation.run_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S,
1467  generation: Generation) -> IO(S & Result<&2, &2, GenerationError, LocalContext>):
1468  match generation:
1469    case Generation{fuel, step}:
1470      Draw.finished(~S, Draw.read(~S, ~read, fuel, (source, step)))

Uses (11)

Used by (2)