Sequence.length_from: def of bend-edit-distance@0.2.2.0 Import: import bend-edit-distance@0.2.2.0/src/Sequence.bend as Sequence Lines 3-11 of bend-edit-distance@0.2.2.0/src/Sequence.bend: https://jend.leeeet.dev/read.txt?path=bend-edit-distance@0.2.2.0/src/Sequence.bend&start_line=3&end_line=11 import Base # Base.String.length builds one continuation per character on Bend 2.0.37's # device stack (2048 words). An accumulator keeps this traversal flat, so # supported 4096-byte inputs do not exhaust a lane before Myers starts. def length_from(sequence: String, count: Nat) -> Nat: match sequence: case SNil{}: count case SCon{_, tail}: length_from(tail, 1n+count) Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String