def dots.seg
import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4import Base
87# Canonical URI (RFC 3986 §5.2.4 for services other than s3): "" and "." segments drop, ".." pops.
88def dots.seg(skip: Bool, up: Bool, +seg: String, st: List<&2, String>) -> List<&2, String>:
89 match skip up:
90 case True{} _:
91 st
92 case False{} True{}:
93 List.drop(&2, String, st, 1n)
94 case False{} False{}:
95 Con{seg, st}