def ends_in_ellipsis

cli@0.2.0.0 · cli.bend:1410

import cli@0.2.0.0/cli.bend as Cli
import Base

1410# Whether s ends in "...": run counts the dots just before s.
1411def ends_in_ellipsis(s: String, run: Nat) -> Bool:
1412  match s:
1413    case SNil{}: Nat.is_lt(2n, run)
1414    case SCon{h, t}:
1415      ends_in_ellipsis(t, Bool.pick(Nat, Char.is_eq(h, '.'), Nat.add(run, 1n), 0n))

Uses (8)

Used by (1)