def asks_help
import bolt@1.26.0.0/src/args.bend as Argsimport Base
import bolt@1.26.0.0/src/lazy/lazy.bend as Lazy
53# whether `--help` stands among the words before the first `--` (after it,
54# every word is a file); the search stops at either
55def asks_help(ws: List<&2, String>) -> Bool:
56 match ws:
57 case Nil{}:
58 False{}
59 case Con{+ww, rest}:
60 Lazy.and_then(Bool.not(String.eq(ww, "--")), _u => Lazy.or_else(String.eq(ww, "--help"), _v => asks_help(rest)))