def alld

lawful-fields@0.1.1.0 · proof_digits.bend:23

import lawful-fields@0.1.1.0/proof_digits.bend as ProofDigits
import Base

23# Every element is a digit byte (48 to 57).
24def alld(xs: List<&2, U32>) -> Bool:
25  match xs:
26    case Nil{}:
27      True{}
28    case Con{+x, t}:
29      Bool.and(Bool.and(U32.is_ge(x, 48), U32.is_le(x, 57)), alld(t))

Uses (6)

Used by (5)