def has
import bend-ml-bpe-tokenizer@0.1.3.0/main.bend as BendMlBpeTokenizerimport Base
138# does some rule in the table have the id i?
139def has(+D: List<&2, Rule>, +i: Nat) -> Bool:
140 match D:
141 case Nil{}:
142 False{}
143 case Con{Rule{+j, a, b}, t}:
144 Bool.or(Nat.is_eq(i, j), has(t, i))