def retained_journal

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

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

96def retained_journal(~A:Data,~B:Data,journal:List<&2,Ev.Batch<Publication<A,B>>>,+firstDropped:Nat,+secondDropped:Nat) -> List<&2,Ev.Batch<Publication<A,B>>>:
97  match journal:
98    case []:[]
99    case Ev.Batch{+tick,records} <> rest:retained_batch_join(~A,~B,tick,retained_records(~A,~B,records,tick,firstDropped,secondDropped),retained_journal(~A,~B,rest,firstDropped,secondDropped))

Uses (6)

Used by (1)