def init

bolt@1.27.0.0 · src/rules/imports.bend:35

import bolt@1.27.0.0/src/rules/imports.bend as Imports
import 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)

Uses (2)

Used by (2)