def counted
import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as BundleBatchimport 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)