def w8s.eq

bend-osdev-bytes@0.1.1.0 · bytes.bend:518

import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytes
import Base

518# whether two word lists are equal; every word is compared (no early exit)
519def w8s.eq(xs: List<&2, OctByte>, ys: List<&2, OctByte>, ok: Bool) -> Bool:
520  match xs ys:
521    case Nil{} Nil{}:
522      ok
523    case Con{a, s} Con{b, t}:
524      w8s.eq(s, t, Bool.and(ok, U32.is_eq(oct.to(a), oct.to(b))))
525    case _ _:
526      False{}

Uses (6)

Used by (2)