Cli.sub_pages: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 7534-7541 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=7534&end_line=7541 import Base def sub_pages(items: List<&2, Item>, +page: String) -> List<&2, String>: match items: case Nil{}: Nil{} case Sub{name, about, +children} <> tail: +rest = sub_pages(tail, page) Bool.pick(List<&2, String>, has_hidden(children), rest, String.concat([page, "-", name]) <> rest) case head <> tail: sub_pages(tail, page) Uses (6): 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.concat 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=has_hidden