Cli.scope_args: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 4346-4353 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=4346&end_line=4353 import Base # The args in scope at path (ยง8.1), as parse orders them: globals first. def scope_args(path: List<&2, String>, +items: List<&2, Item>, globals: List<&2, Item>) -> List<&2, Item>: match path: case Nil{}: List.append(&2, Item, globals, items) case name <> tail: scope_args(tail, sub_items(find_sub(items, name)), List.append(&2, Item, global_items(items), globals)) Uses (7): 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=find_sub 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=sub_items