Pkg.trim.back: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg Lines 100-108 of ezx@1.11.0.0/src/pkg/pkg.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&start_line=100&end_line=108 import Base # a line with its trailing blanks dropped, read from the front, so that the # trim of a line is a walk over it rather than over its reverse def trim.back(line: String) -> String: match line: case SNil{}: SNil{} case SCon{+h, t}: +rest = trim.back(t) trim.back.at(Bool.and(blank(h), String.is_empty(rest)), h, rest) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=blank https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=trim.back.at