def composed_scan

bendvy-ecs-core@0.1.0.4 · inspector_query.bend:201

import bendvy-ecs-core@0.1.0.4/inspector_query.bend as InspectorQuery
import Base
import inspector_query_projection.bend as Q
import world.bend as W

201# Engine scan adapter over supplied targets and a reversed row accumulator.
202# Canonical callers supply live targets and an empty initial accumulator.
203# This helper does not independently validate arbitrary handles; prefer
204# each_composed on a canonical composed grant for application inspection.
205def composed_scan(~H:Type,~S:Data,~V:Data,~selection:Q.DeclaredSelection<H,S,V>,targets:List<&2,W.Handle<S>>,owner:H,rows:List<&2,ProjectedRow<S,V>>) -> ScanResult<H,S,V>:
206  composed_fold_done(~H,~S,~V,List.foldl(~&2,~W.Handle<S>,~(H & List<&2,ProjectedRow<S,V>>),~(acc => target => composed_fold_step(~H,~S,~V,~selection,acc,target)),targets,(owner,rows)))

Uses (10)

Used by (1)