def apply

bend-kit-runner@0.13.0.1 · runner.bend:303

import bend-kit-runner@0.13.0.1/runner.bend as Runner
import Base

303# Folds one record into the replayed state. A record that does not decode ends the replay with None.
304def apply(~A: Data, ~R: Type, ~dec: R -> Maybe<&2, Op<A>>, acc: Maybe<&2, State<A>>, r: R) -> Maybe<&2, State<A>>:
305  match acc:
306    case None{}:
307      None{}
308    case Some{s}:
309      apply.op(~A, dec(r), s)

Uses (4)

Used by (0)

No other definition uses this definition.