def tested
import bolt@1.27.0.0/src/paths.bend as Pathsimport Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
20# is some segment but the last exactly `tests`?
21def tested(segs: List<&2, String>) -> Bool:
22 match segs:
23 case Nil{}:
24 False{}
25 case Con{+s, +rest}:
26 Lazy.or_else(Bool.and(String.eq(s, "tests"), Bool.not(List.is_empty(&2, String, rest))), _u => tested(rest))