def accepts
import snap@1.4.0.0/src/argv.bend as Argvimport Base
36# whether an argv can reach its program whole: it names a program, and no
37# argument holds NUL, which separates them on the wire and which no program
38# could be handed inside an argument anyway
39def accepts(argv: List<&2, String>) -> Bool:
40 match argv:
41 case []:
42 False{}
43 case +prog <> +args:
44 Bool.and(Bool.not(String.is_empty(prog)), free_of.all(prog <> args, '\0'))