def eq.go
bend-kit-bytes@0.3.3.0 · bytes.bend:547
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base
547
548def eq.go(n: Nat, same: Bool, r: Array<U32> & U32, s: Array<U32> & U32, +i: U32) -> Array<U32> & Array<U32> & Bool:
549 match n:
550 case 0n:
551 (x, v) = r
552 (y, w) = s
553 (x, y, same)
554 case 1n+p:
555 match same:
556 case False{}:
557 (x, v) = r
558 (y, w) = s
559 (x, y, False{})
560 case True{}:
561 (x, +v) = r
562 (y, +w) = s
563 eq.go(p, U32.is_eq(v, w), Array.get(U32, x, (i + 1 : U32)), Array.get(U32, y, (i + 1 : U32)), (i + 1 : U32))