Cli.missing_items: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 3995-4013 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=3995&end_line=4013 import Base # What E06 lists, in items' order: each required arg not given, and each # need_one group with no arg given that done does not name yet. def missing_items(items: List<&2, SpecItem>, +all_items: List<&2, SpecItem>, +fields: List<&2, Field>, +done: List<&2, String>) -> List<&2, String>: match items: case Nil{}: Nil{} case SpecArg{info} <> tail: List.append(&2, String, missing_arg(info, fields), missing_items(tail, all_items, fields, done)) case SpecOther{NeedOne{+name}} <> tail: List.append(&2, String, missing_once(List.contains(~String, ~String.eq, done, name), all_items, fields, name), missing_items(tail, all_items, fields, name <> done)) case head <> tail: missing_items(tail, all_items, fields, done) Uses (10): 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=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Field 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=SpecItem https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=missing_arg https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=missing_once