Cli.slot_traits_go: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 2906-2918 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=2906&end_line=2918 import Base # The traits of the first of slots that takes the operand after count # others, where here says whether slots' head does. It only reads slots: # a walk that returned the slot would copy each of its fields. def slot_traits_go(slots: List<&2, ArgInfo>, count: Nat, here: Bool) -> SlotTraits: match slots here: case Nil{} _: SlotTraits{False{}, False{}, False{}} case ArgInfo{id, usage, short, long, kind, +attrs} <> tail True{}: SlotTraits{has_rest(attrs), has_hyphen(attrs), has_as_f32(attrs)} case info <> +tail False{}: +rest = Nat.sub(count, 1n) next = slot_here(tail, rest) slot_traits_go(tail, rest, next) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=ArgInfo https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=SlotTraits https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_as_f32 https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_hyphen https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_rest https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=slot_here