def join.at
import ezx@1.11.0.0/src/pkg/path.bend as Pathimport Base
130# the path before it is normalised: the second alone when there is no
131# directory to take it relative to, the two spliced otherwise. Split out so
132# that `norm` runs once. Under a `Bool.pick` both arms were built, so every
133# join paid two full component walks and one concatenation it threw away.
134def join.at(bare: Bool, left: String, right: String) -> String:
135 match bare:
136 case True{}:
137 right
138 case False{}:
139 left ++ "/" ++ right