def flatten_bonds
import bend-prot@0.1.0.0/bonded.bend as Bondedimport Base
124# Pair bonds -> flat [a, b, ..] so tests can re-scan (Data reuses).
125def flatten_bonds(bs: List<&1, U32 & U32>) -> List<&2, U32>:
126 match bs:
127 case Nil{}:
128 Nil{}
129 case (x, y) <> t:
130 x <> y <> flatten_bonds(t)