def bits.take
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
1216def bits.take(hit: Bool, +follow: U32, +fin: Bool, +end: Bool, acc: Bs) -> Bs:
1217 match hit:
1218 case False{}:
1219 acc
1220 case True{}:
1221 Bs{+nx, f, e} = acc
1222 Bs{(nx .|. follow : U32), f || fin, e || end}