def at_least

bend-toon-codec@0.1.0.0 · src/head.bend:26

import bend-toon-codec@0.1.0.0/src/head.bend as Head
import Base

26# Has the string at least `n` characters?
27def at_least(+s: String, +n: Nat) -> Bool:
28  match s n:
29    case _ 0n:
30      True{}
31    case SNil{} _:
32      False{}
33    case SCon{h, t} 1n+p:
34      at_least(t, p)

Uses (3)

Used by (1)