Pkg.comps: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg Lines 1224-1229 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=1224&end_line=1229 import Base import ezx@1.11.0.0/src/pkg/path.bend as P # how many components a checkout-relative directory has: none for the # checkout's top def comps(+dir: String) -> Nat: +d = P.norm(dir) Bool.pick(Nat, Bool.or(String.eq(d, "."), String.is_empty(d)), 0n, List.length(&2, String, String.split(d, '/'))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or 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=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/path.bend&name=norm