def counted

bendvy-ecs-core@0.1.0.4 · bundle_batch.bend:28

import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as BundleBatch
import Base
import bendvy-ecs-core@0.1.0.4/deferred_command.bend as Deferred

28# Count returns the very same affine closures in the same reverse queue order.
29def counted(~World:Type,command:Deferred.Command<World>,result:List<Deferred.Command<World>> & Nat) -> List<Deferred.Command<World>> & Nat:
30  match result:
31    case (commands,count): (command <> commands,1n+count)

Uses (5)

Used by (1)