Topology.contacts_between: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/topology.bend as Topology Lines 90-97 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=90&end_line=97 import Base import bend-prot@0.1.0.0/protein.bend as P # Interface size: pairs (x in xs, y in ys) with dist2 < c2. Consumes xs once; # ys is reusable so every head reuses it (reference counted). def contacts_between(xs: List<&2, P.Atom>, +ys: List<&2, P.Atom>, +c2: F32) -> Nat: match xs: case Nil{}: 0n case h <> t: Nat.add(contacts_between(t, ys, c2), contacts_of_head(h, ys, c2)) Uses (6): 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/protein.bend&name=Atom https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/topology.bend&name=contacts_of_head