def read_loop
import bendvy-ecs-core@0.1.0.4/internal/relation_failures/queue.bend as Queueimport Base
64def read_loop(~E: Data,batches: List<&2,Batch<E>>,+cursor: Nat,acc: List<&2,E>) -> List<&2,E>:
65 match batches:
66 case []: acc
67 case Batch{tick,_,items} <> rest: read_loop(~E,rest,cursor,visible_items(~E,Nat.is_lt(cursor,tick),items,acc))