def len.go

bolt@1.27.0.0 · src/rules/suspicious/prefix.bend:68

import bolt@1.27.0.0/src/rules/suspicious/prefix.bend as Prefix
import Base

68# the length of the rest of a literal's text, from where it is
69def len.go(tt: String, +mm: Mode) -> Nat:
70  match tt:
71    case SNil{}:
72      0n
73    case SCon{+cc, rest}:
74      Nat.add(len.add(mm, cc), len.go(rest, len.next(mm, cc)))

Uses (6)

Used by (1)