def odd

emerging-ezjson@1.3.0.0 · src/fixed.bend:187

import emerging-ezjson@1.3.0.0/src/fixed.bend as Fixed
import Base

187# whether the last kept digit is odd; no digit is an even 0
188def odd(kept: String) -> Bool:
189  match kept:
190    case SNil{}:
191      False{}
192    case SCon{hd, _tl}:
193      U32.is_eq(U32.mod(Char.to_u32(hd), 2), 1)

Uses (5)

Used by (1)