def Iso8601.frac.strip.go

bend-time-lib@0.4.0.1 · iso8601.bend:87

import bend-time-lib@0.4.0.1/iso8601.bend as Iso8601
import Base

87def Iso8601.frac.strip.go(+k: Nat, +n: U32, z: Bool) -> U32 & Nat:
88  match k:
89    case 0n:
90      (n, 1n)
91    case 1n:
92      (n, 1n)
93    case 1n++p:
94      match z:
95        case True{}:
96          Iso8601.frac.strip.go(
97            p, U32.div(n, 10), U32.is_eq(U32.mod(U32.div(n, 10), 10), 0)
98          )
99        case False{}:
100          (n, k)

Uses (8)

Used by (1)