def under
import ezx@1.11.0.0/src/ws/workspace.bend as Workspaceimport Base
157# whether a directory is directly under another: the other's segments, then
158# exactly one more
159def under(ps: List<&2, String>, ds: List<&2, String>) -> Bool:
160 match ps:
161 case []:
162 one(ds)
163 case +ph <> pt:
164 match ds:
165 case []:
166 False{}
167 case +dh <> dt:
168 rest = under(pt, dt)
169 Bool.and(String.eq(ph, dh), rest)