def count

bendvy-ecs-core@0.1.0.4 · ordinary_binding_provision.bend:36

import bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend as OrdinaryBindingProvision
import Base
import bendvy-ecs-core@0.1.0.4/column.bend as Col
import bendvy-ecs-core@0.1.0.4/world.bend as W

36# Trusted population callback counting this bound component among supplied
37# handles and returning the retained store with one Some count slot.
38# Does not validate namespaces/generations; use the matching ordinary traversal.
39def count(~S:Data,~C:Type,~Rest:Type,~P:Type,~take:C -> Rest & Col.Column<S,P>,~put:Rest -> Col.Column<S,P> -> C,store:C,handles:List<&2,W.Handle<S>>) -> C & List<&2,Maybe<&2,U32>>:count_returned(~C,count_loop(~S,~C,~Rest,~P,~take,~put,handles,store,0))

Uses (8)

Used by (5)