def present_offsets

bendvy-ecs-core@0.1.0.3 · execution_query_schema.bend:92

import bendvy-ecs-core@0.1.0.3/execution_query_schema.bend as ExecutionQuerySchema
import Base
import bendvy-ecs-core@0.1.0.3/execution_query_matches.bend as Q

92def present_offsets(-V:Data,rows:List<&2,Q.Row<V>>) -> List<&2,U32>:
93  match rows:
94    case []:[]
95    case Q.Row{_,None{}} <> rest:present_offsets(V,rest)
96    case Q.Row{offset,Some{_}} <> rest:offset <> present_offsets(V,rest)
97    case Q.StampedRow{_,None{},_} <> rest:present_offsets(V,rest)
98    case Q.StampedRow{offset,Some{_},_} <> rest:offset <> present_offsets(V,rest)

Uses (4)

Used by (1)