Spec.dotn: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/spec.bend as Spec Lines 11-17 of bendtorch@1.3.0.0/spec.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/spec.bend&start_line=11&end_line=17 import Base # the dot product of the common prefix def dotn(xs: List<&2, Nat>, ys: List<&2, Nat>) -> Nat: match xs ys: case Con{x, xt} Con{y, yt}: Nat.add(Nat.mul(x, y), dotn(xt, yt)) case _ _: 0n Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul