def invoke
import bendvy-ecs-core@0.1.0.3/capabilities.bend as Capabilitiesimport Base
128# One executor for every caller-authored finite capability shape.
129# Invoke a reusable universally quantified body with Data arguments and
130# declared Ops(H). H remains opaque to the body; closed caps must implement
131# the intended operations. This dispatcher adds no transaction or World checks.
132def invoke(~Ops: Type -> Type,~A: Data,~U: Type,~body: @-H: Type -> @-caps: Ops(H) -> A -> H -> H & U,~H: Type,~caps: Ops(H),args: A,ctx: H) -> H & U:
133 body(H,caps,args,ctx)