def slot_here

cli@0.2.0.0 · cli.bend:2898

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

2898# Whether slots' first slot takes the operand after count others: it is
2899# the count'th, or variadic.
2900def slot_here(slots: List<&2, ArgInfo>, count: Nat) -> Bool:
2901  match slots:
2902    case Nil{}: False{}
2903    case ArgInfo{id, usage, short, long, kind, attrs} <> tail:
2904      Bool.or(Nat.is_eq(count, 0n), kind_variadic_pos(kind))

Uses (7)

Used by (2)