def AaText.prefix
import bend-osdev-apparmor@0.1.0.0/text.bend as Textimport Base
87# xs begins with ys
88def AaText.prefix(xs: List<&2, U32>, ys: List<&2, U32>) -> Bool:
89 match xs ys:
90 case Nil{} Nil{}:
91 True{}
92 case Nil{} Con{c, t}:
93 False{}
94 case Con{h, t} Nil{}:
95 True{}
96 case Con{h, t} Con{c, u}:
97 Bool.and(U32.is_eq(h, c), AaText.prefix(t, u))