def find2.go
lawful-bytes@0.1.1.0 · bytes.bend:96
import lawful-bytes@0.1.1.0/bytes.bend as Bytes
import Base
import lawful-bytes@0.1.1.0/defs.bend as D
96def find2.go(n: Nat, hit: Bool, r: D.Bytes & U32, +j: U32, +to: U32, +c1: U32, +c2: U32) -> D.Bytes & U32:
97 match n hit:
98 case 0n _:
99 (b, x) = r
100 (b, to)
101 case 1n+k True{}:
102 (b, x) = r
103 (b, j)
104 case 1n+k False{}:
105 (b, +x) = r
106 find2.go(k, U32.is_eq(x, c1) || U32.is_eq(x, c2), at(b, (j + 2 : U32)), (j + 1 : U32), to, c1, c2)