def scan
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
1117def scan(xs: List<&2, Th>, +prog: Trie<Inst>, +c: Maybe<&2, Char>, +any: Bool, st: Sc) -> Sc:
1118 match xs:
1119 case Nil{}:
1120 st
1121 case Con{th, t}:
1122 scan(t, prog, c, any, scan.step(st, th, prog, c, any))