def len.go
import bolt@1.27.0.0/src/rules/suspicious/prefix.bend as Prefiximport 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)))