def pairs_of_flat

bend-prot@0.1.0.0 · sim.bend:254

import bend-prot@0.1.0.0/sim.bend as Sim
import Base

254# Flat bonds back to pairs for the pair-list energies.
255def pairs_of_flat(bs: List<&2, U32>) -> List<&1, U32 & U32>:
256  match bs:
257    case Nil{}:
258      Nil{}
259    case x <> Nil{}:
260      Nil{}
261    case x <> y <> t:
262      (x, y) <> pairs_of_flat(t)

Uses (4)

Used by (3)