def sub_of
import shake@0.7.0.0/src/cli.bend as Cliimport Base
542# the Matched of subcommand `name`, when it is the one selected
543def sub_of(mm: Matched, +name: String) -> Maybe<&2, Matched>:
544 match mm:
545 case Leaf{_b}:
546 None{}
547 case Node{_b, nn, next}:
548 sub_of.pick(String.eq(nn, name), next)