def operand_count

cli@0.2.0.0 · cli.bend:5979

import cli@0.2.0.0/cli.bend as Cli
import Base

5979def operand_count(events: List<&2, ScanEvent>, count: Nat) -> Nat:
5980  match events:
5981    case Nil{}: count
5982    case Enter{name} <> tail: operand_count(tail, 0n)
5983    case Operand{token} <> tail: operand_count(tail, (count + 1n : Nat))
5984    case event <> tail: operand_count(tail, count)

Uses (4)

Used by (1)