def retained_batch
import bendvy-ecs-core@0.1.0.4/event_publication.bend as EventPublicationimport 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