def eq_acc
bend-collections-laws-crypto@1.0.0.0 · src/containers/hash_table.bend:75
import bend-collections-laws-crypto@1.0.0.0/src/containers/hash_table.bend as HashTable
import Base
75def eq_acc(a: String, b: String, ra: String, rb: String, +e: Bool) -> (String & String) & Bool:
76 match a b:
77 case SNil{} SNil{}:
78 ((rev_onto(ra, SNil{}), rev_onto(rb, SNil{})), e)
79 case SNil{} SCon{h, t}:
80 ((rev_onto(ra, SNil{}), rev_onto(rb, SCon{h, t})), False{})
81 case SCon{h, t} SNil{}:
82 ((rev_onto(ra, SCon{h, t}), rev_onto(rb, SNil{})), False{})
83 case SCon{Chr{+x}, ta} SCon{Chr{+y}, tb}:
84 eq_acc(ta, tb, SCon{Chr{x}, ra}, SCon{Chr{y}, rb}, Bool.and(e, U32.is_eq(x, y)))