Protein.sum_count_atoms: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/protein.bend as Protein Lines 68-74 of bend-prot@0.1.0.0/protein.bend: https://jend.leeeet.dev/read.txt?path=bend-prot@0.1.0.0/protein.bend&start_line=68&end_line=74 import Base import bend-prot@0.1.0.0/geom.bend as G # Sum positions + count in one pass (list consumed once) def sum_count_atoms(xs: List<&2, Atom>) -> G.Vec3 & Nat: match xs: case Nil{}: (G.V3{0.0, 0.0, 0.0}, 0n) case h <> t: sum_count_extend(h, sum_count_atoms(t)) Uses (7): 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/protein.bend&name=sum_count_extend