def kept_batch
import bendvy-ecs-core@0.1.0.4/event_family_runtime.bend as EventFamilyRuntimeimport Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
31def kept_batch(~P:Data,keep:Bool,tick:Nat,records:List<&2,P>,journal:List<&2,Ev.Batch<P>>) -> List<&2,Ev.Batch<P>>:
32 match keep:
33 case False{}:journal
34 case True{}:Ev.Batch{tick,records} <> journal