def text.digits.zero.if

ezsys@0.1.0.0 · src/str.bend:457

import ezsys@0.1.0.0/src/str.bend as Str
import Base

457# a leading '0' is dropped, and the zeros after it
458def text.digits.zero.if(
459  zero: Bool,
460  hd: Char,
461  tl: String,
462  more: Unit -> String
463) -> String:
464  match zero:
465    case True{}:
466      more(Unit{})
467    case False{}:
468      SCon{hd, tl}

Uses (4)

Used by (1)