def Radix.sign

bend-kit-int@0.2.0.0 · int.bend:330

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

330# Splits one leading '-' or '+' off s: (negative, rest).
331def Radix.sign(s: String) -> Bool & String:
332  match s:
333    case SNil{}:
334      (False{}, SNil{})
335    case SCon{Chr{x}, t}:
336      +c = {x : U32}
337      Radix.sign.if(U32.is_eq(c, 45), U32.is_eq(c, 43), Chr{c}, t)

Uses (8)

Used by (3)