Check.forest: def of shake@0.7.0.0 Import: import shake@0.7.0.0/src/check.bend as Check Lines 126-137 of shake@0.7.0.0/src/check.bend: https://jend.leeeet.dev/read.txt?path=shake@0.7.0.0/src/check.bend&start_line=126&end_line=137 import Base import shake@0.7.0.0/src/cli.bend as C # every subcommand's reports, each under its own path, depth first. The path # is carried reversed, innermost name first, and read the right way round # once per command def forest(subs: List<&2, C.Sub>, +back: List<&2, String>) -> List<&2, SpecErr>: match subs: case Nil{}: [] case Con{hh, tt}: C.Sub{+name, _a, +args, +kids} = hh +here = pushed(name, back) both(cmd(List.reverse(&2, String, here), args, kids), both(forest(kids, here), forest(tt, back))) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/check.bend&name=SpecErr https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/check.bend&name=both https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/check.bend&name=cmd https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/check.bend&name=pushed https://jend.leeeet.dev/definition.txt?path=shake@0.7.0.0/src/cli.bend&name=Sub