Topology.sumd2_count: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/topology.bend as Topology Lines 61-67 of bend-prot@0.1.0.0/topology.bend: https://jend.leeeet.dev/read.txt?path=bend-prot@0.1.0.0/topology.bend&start_line=61&end_line=67 import Base import bend-prot@0.1.0.0/geom.bend as G import bend-prot@0.1.0.0/protein.bend as P # One pass: summed squared distances about qp, plus atom count. def sumd2_count(xs: List<&2, P.Atom>, +qp: G.Vec3) -> F32 & Nat: match xs: case Nil{}: (0.0, 0n) case h <> t: sumd2_extend(head_dist2(h, qp), sumd2_count(t, qp)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/geom.bend&name=Vec3 https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/protein.bend&name=Atom https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/topology.bend&name=head_dist2 https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/topology.bend&name=sumd2_extend