Cli.find_key: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 2619-2625 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=2619&end_line=2625 import Base # The first key named query; after a hit it only walks the rest. def find_key(keys: List<&2, OptKey>, +query: String, found: Maybe<&2, OptFound>) -> Maybe<&2, OptFound>: match keys found: case Nil{} hit: hit case key <> tail Some{hit}: Some{hit} case key <> tail None{}: find_key(tail, query, key_found(key, query)) Uses (6): 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=OptFound https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=OptKey https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=key_found