def paths.safe

ezx@1.11.0.0 · src/fetch/plan.bend:190

import ezx@1.11.0.0/src/fetch/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/world.bend as W

190# whether every path stays inside the tree
191def paths.safe(ls: List<&2, W.Source>) -> Bool:
192  match ls:
193    case []:
194      True{}
195    case W.Source{+at, _text} <> t:
196      +rest = paths.safe(t)
197      Bool.and(path.safe(at), rest)

Uses (5)

Used by (2)