Cli.stop_number: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6477-6485 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6477&end_line=6485 import Base # The number of the stop at words, from found on. def stop_number(stops: List<&2, Stop>, +words: List<&2, String>, found: Maybe<&2, Nat>) -> Nat: match stops found: case _ Some{k}: k case Nil{} None{}: 0n case Stop{+k, here, opts, builtins, subs, slots} <> tail None{}: stop_number(tail, words, Bool.pick(Maybe<&2, Nat>, same_words(here, words), Some{k}, None{})) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Stop https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=same_words