def pad
import emerging-ezjson@1.3.0.0/src/fixed.bend as Fixedimport Base
159# the first `nn` fraction digits, 0s past the last, and the digits dropped
160def pad(nn: Nat, right: String) -> String & String:
161 match nn:
162 case 0n:
163 ("", right)
164 case 1n+m:
165 match right:
166 case SNil{}:
167 cut.put('0', pad(m, ""))
168 case SCon{hd, tl}:
169 cut.put(hd, pad(m, tl))