def count_commands

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

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

32def count_commands(~World:Type,commands:List<Deferred.Command<World>>) -> List<Deferred.Command<World>> & Nat:
33  match commands:
34    case []: ([],0n)
35    case command <> tail: counted(~World,command,count_commands(~World,tail))

Uses (6)

Used by (3)