def flatten_bonds

bend-prot@0.1.0.0 · bonded.bend:124

import bend-prot@0.1.0.0/bonded.bend as Bonded
import 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)

Uses (4)

Used by (1)