def position_take_count

cli@0.2.0.0 · cli.bend:3855

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

3855def position_take_count(kind: UsageKind,
3856    after: List<&2, ArgInfo>, +tokens: List<&2, String>) -> Nat:
3857  match kind:
3858    case PosKind{required, True{}}:
3859      Nat.sub(List.length(&2, String, tokens),
3860        List.length(&2, ArgInfo, after))
3861    case _:
3862      Bool.pick(Nat, List.is_empty(&2, String, tokens), 0n, 1n)

Uses (10)

Used by (1)