def tick.due

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

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

1543def tick.due(~A: Data, ~penc: A -> Bytes.Bytes, due: Bool, +b: Bool, r: Runner<A>) -> IO(Runner<A> & Out(Bool)):
1544  match due:
1545    case False{}:
1546      IO.pure(Runner<A> & Out(Bool), (r, Done{b}))
1547    case True{}:
1548      do IO<Runner<A> & Out(Bool)>:
1549        y : Ran(A) <- compact(~A, ~penc, r)
1550        return tick.compacted(A, b, y)

Uses (13)

Used by (1)