def Iso8601.strip0
import bend-time-lib@0.4.0.1/iso8601.bend as Iso8601import Base
62def Iso8601.strip0(k: Nat, s: String, z: Bool) -> String:
63 match k:
64 case 0n:
65 SCon{'0', SNil{}}
66 case 1n++p:
67 match s:
68 case SNil{}:
69 SCon{'0', SNil{}}
70 case SCon{+h, +t}:
71 match z:
72 case False{}:
73 SCon{h, t}
74 case True{}:
75 Iso8601.strip0(p, t, Iso8601.lead0(t))