def prefixes

near-v-framework@0.4.0.0 · domain/architecture/system/container/ops.bend:162

import near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend as Ops
import Base

162def prefixes(segs: List<&2, String>, +acc: String) -> List<&2, String>:
163  match segs:
164    case []:
165      [acc]
166    case +s <> rest:
167      acc <> prefixes(rest, Bool.pick(String, String.is_empty(acc), s, acc ++ "/" ++ s))

Uses (5)

Used by (1)