def diff
import bend-collections@1.0.0.0/src/crypto/subtle.bend as Subtleimport Base
16# OR of the XOR of every pair of positions, over the common prefix.
17def diff(a: List<&2, U32>, b: List<&2, U32>, acc: U32) -> U32:
18 match a b:
19 case x <> xs y <> ys:
20 diff(xs, ys, U32.or(acc, U32.xor(x, y)))
21 case _ _:
22 acc