Yamlr.lead.count: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fmt/yamlr.bend as Yamlr Lines 33-40 of cswap-bend-cli@0.1.0.0/fmt/yamlr.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&start_line=33&end_line=40 import Base # Leading spaces; a tab in the indentation is an error (-1 is not a Nat, so # the flag travels beside). def lead.count(s: String, +n: Nat) -> Nat: match s: case SCon{Chr{c}, t}: Bool.pick(Nat, U32.is_eq(c, 32), lead.count(t, Nat.add(n, 1n)), n) case SNil{}: n Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq