def ups.go

ezx@1.11.0.0 · src/pkg/path.bend:155

import ezx@1.11.0.0/src/pkg/path.bend as Path
import Base

155# the climbs among components counted one at a time. Base's `List.filter`
156# applies an erased function parameter, so it falls outside the termination
157# check; this count is structural.
158def ups.go(ps: List<&2, String>) -> Nat:
159  match ps:
160    case []:
161      0n
162    case +h <> t:
163      Nat.add(Bool.pick(Nat, up.is(h), 1n, 0n), ups.go(t))

Uses (6)

Used by (1)