def retained_batch

bendvy-ecs-core@0.1.0.4 · event_publication.bend:90

import bendvy-ecs-core@0.1.0.4/event_publication.bend as EventPublication
import Base
import event_runtime.bend as Ev

90def retained_batch(~A:Data,~B:Data,keep:Bool,tick:Nat,records:List<&2,Publication<A,B>>,rest:List<&2,Ev.Batch<Publication<A,B>>>) -> List<&2,Ev.Batch<Publication<A,B>>>:
91  match keep:
92    case True{}:Ev.Batch{tick,records} <> rest
93    case False{}:rest

Uses (5)

Used by (1)