def shr
import cswap-bend-cli@0.1.0.0/settings.bend as Settingsimport Base
77# Move the point n digits right (digits come from the fraction, zeros pad).
78def shr(n: Nat, neg: Bool, i: String, f: String) -> Dec:
79 match n f:
80 case 0n _:
81 canon(neg, i, f)
82 case 1n+p SNil{}:
83 shr(p, neg, i ++ "0", "")
84 case 1n+p SCon{c, t}:
85 shr(p, neg, i ++ SCon{c, SNil{}}, t)