Enc.points: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/enc.bend as Enc Lines 95-105 of bolt@1.27.0.0/src/lsp/enc.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&start_line=95&end_line=105 import Base # the chars the first u UTF-16 code units of a line cover; an offset inside # a pair covers its char, and one past the line's end counts one column a # unit def points(cs: List<&2, Char>, uu: Nat) -> Nat: match cs uu: case Nil{} _: uu case Con{_c, _t} 0n: 0n case Con{c, t} 1n+p: 1n+points(t, points.skip(wide(c), p)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char 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=bolt@1.27.0.0/src/lsp/enc.bend&name=points.skip https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&name=wide