def reading
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as EventRuntimeimport Base
158def reading(~E: Data,position: Position,+batches: List<&2,Batch<E>>,+dropped: Nat) -> Reading<E>:
159 match position:
160 case Position{_,+cursor,+registered}: Reading{since(~E,batches,cursor),Nat.is_lt(Nat.max(cursor,registered),dropped)}