Myers.band_finish: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Myers.bend as Myers Lines 356-366 of bend-edit-distance@0.2.2.0/src/Myers.bend: https://jend.leeeet.dev/read.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&start_line=356&end_line=366 import Base import bend-edit-distance@0.2.2.0/EdlibTypes.bend as E def band_finish(band: Band, maximum: Nat, padding: Nat, blocks: Nat, columns: Nat) -> Search: match band: case Band{_, Nil{}, _}: Search{E.NotFound{}, blocks, columns, 1n} case Band{_, entries, Nil{}}: +score = band_last_score(entries, padding) Search{Bool.pick(E.EditDistance, Nat.is_le(score, maximum), E.Found{score}, E.NotFound{}), blocks, columns, 1n} case _: Search{E.NotFound{}, blocks, columns, 1n} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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.is_le https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/EdlibTypes.bend&name=EditDistance https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=Band https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=Search https://jend.leeeet.dev/definition.txt?path=bend-edit-distance@0.2.2.0/src/Myers.bend&name=band_last_score