def digits

ezx@1.11.0.0 · src/pkg/pkg.bend:367

import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg
import Base

367# whether every character is a digit
368def digits(text: String) -> Bool:
369  match text:
370    case SNil{}:
371      True{}
372    case SCon{+h, t}:
373      +rest = digits(t)
374      Bool.and(Char.is_digit(h), rest)

Uses (4)

Used by (1)