def init
import bolt@1.27.0.0/src/rules/imports.bend as Importsimport Base
35# the segments but the last
36def init(segs: List<&2, String>) -> List<&2, String>:
37 match segs:
38 case Nil{}:
39 Nil{}
40 case Con{h, Nil{}}:
41 Nil{}
42 case Con{h, t}:
43 h <> init(t)