def stop_number
import cli@0.2.0.0/cli.bend as Cliimport Base
6477# The number of the stop at words, from found on.
6478def stop_number(stops: List<&2, Stop>, +words: List<&2, String>,
6479 found: Maybe<&2, Nat>) -> Nat:
6480 match stops found:
6481 case _ Some{k}: k
6482 case Nil{} None{}: 0n
6483 case Stop{+k, here, opts, builtins, subs, slots} <> tail None{}:
6484 stop_number(tail, words, Bool.pick(Maybe<&2, Nat>,
6485 same_words(here, words), Some{k}, None{}))