Cli.places: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6231-6243 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6231&end_line=6243 import Base # The visible commands below items, whose subcommands inherit globals. def places(items: List<&2, Item>, +words: List<&2, String>, +globals: List<&2, Item>) -> List<&2, Place>: match items: case Nil{}: Nil{} case Sub{name, about, +children} <> tail: +here = List.append(&2, String, words, [name]) List.append(&2, Place, Bool.pick(List<&2, Place>, has_hidden(children), [], Place{here, children, globals} <> places(children, here, List.append(&2, Item, globals, global_items(children)))), places(tail, words, globals)) case head <> tail: places(tail, words, globals) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append 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=Item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Place https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=global_items https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_hidden