Cli.find_sub_key: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 3439-3446 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=3439&end_line=3446 import Base # find_sub over a scope's subcommands; after a hit it only walks the rest. def find_sub_key(subs: List<&2, SubKey>, +query: String, found: Maybe<&2, SubKey>) -> Maybe<&2, SubKey>: match subs found: case Nil{} hit: hit case key <> tail Some{hit}: Some{hit} case key <> tail None{}: find_sub_key(tail, query, sub_key_found(key, query)) Uses (5): 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=String https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=SubKey https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=sub_key_found