Par.count_par4: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/par.bend as Par Lines 16-23 of bend-prot@0.1.0.0/par.bend: https://jend.leeeet.dev/read.txt?path=bend-prot@0.1.0.0/par.bend&start_line=16&end_line=23 import Base import bend-prot@0.1.0.0/geom.bend as G import bend-prot@0.1.0.0/protein.bend as P import bend-prot@0.1.0.0/topology.bend as T def count_par4(xs: List<&2, P.Atom>, +qp: G.Vec3, +c2: F32) -> Nat: match xs: case h1 <> h2 <> h3 <> h4 <> t: a b = T.head_hit_nat(h1, qp, c2) T.head_hit_nat(h2, qp, c2) c d = T.head_hit_nat(h3, qp, c2) T.head_hit_nat(h4, qp, c2) Nat.add(Nat.add(a, b), Nat.add(c, Nat.add(d, count_par4(t, qp, c2)))) case rest: T.count_below(rest, qp, c2) Uses (8): 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=Nat.add 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=count_below https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/topology.bend&name=head_hit_nat