def bpf_count.go
import bend-osdev-bpf@0.1.0.0/validate.bend as Validateimport Base
import bend-osdev-bpf@0.1.0.0/insn.bend as I
128# the number of instructions, as a tail call (PROOF.bend: F_count)
129def bpf_count.go(xs: List<&2, I.BpfOp>, n: Nat) -> Nat:
130 match xs:
131 case Nil{}:
132 n
133 case Con{h, t}:
134 bpf_count.go(t, 1n+n)