Poly.add: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Poly Lines 8-16 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend&start_line=8&end_line=16 import Base # Coefficient-wise sum (XOR); the longer tail is kept. def add(a: List<&2, Bool>, b: List<&2, Bool>) -> List<&2, Bool>: match a b: case Nil{} _: b case x <> xs Nil{}: x <> xs case x <> xs y <> ys: Bool.xor(x, y) <> add(xs, ys) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.xor https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List