def bpf_mem.meet.go
import bend-osdev-bpf@0.1.0.0/validate.bend as Validateimport Base
157# meet the n-th mask ahead with m (acc: the masks before it, last first)
158def bpf_mem.meet.go(ahead: List<&2, U32>, n: Nat, +m: U32, acc: List<&2, U32>) -> List<&2, U32>:
159 match ahead:
160 case Nil{}:
161 List.reverse(&2, U32, acc)
162 case Con{h, t}:
163 match n:
164 case 0n:
165 List.reverse.go(&2, U32, acc, Con{U32.and(h, m), t})
166 case 1n+p:
167 bpf_mem.meet.go(t, p, m, Con{h, acc})