Reconstruction.split_column: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Reconstruction.bend as Reconstruction Lines 146-160 of bend-edit-distance@0.2.2.0/src/Reconstruction.bend: https://jend.leeeet.dev/read.txt?path=bend-edit-distance@0.2.2.0/src/Reconstruction.bend&start_line=146&end_line=160 import Base # Forward[j] + reverse[n-j] is the cost through the midpoint at column j. # Strict comparison keeps the first minimum; this is our deterministic split # policy and is deliberately separate from upstream Hirschberg compatibility. def split_column(forward: List, backward: List, +index: Nat, +best_index: Nat, +best_score: U32) -> Nat: match forward backward: case Nil{} _: best_index case _ Nil{}: best_index case a <> at b <> bt: +score = U32.add(a, b) +next = split_update(index, score, best_index, best_score, U32.is_lt(score, best_score)) split_column(at, bt, 1n+index, split_index(next), split_score(next)) Uses (8): 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Reconstruction.bend&name=split_index https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Reconstruction.bend&name=split_score https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Reconstruction.bend&name=split_update