def shl

cswap-bend-cli@0.1.0.0 · settings.bend:87

import cswap-bend-cli@0.1.0.0/settings.bend as Settings
import Base

87# Move the point n digits left; `ri` is the integer part reversed.
88def shl(n: Nat, neg: Bool, ri: String, f: String) -> Dec:
89  match n ri:
90    case 0n _:
91      canon(neg, String.reverse(ri), f)
92    case 1n+p SNil{}:
93      shl(p, neg, "", "0" ++ f)
94    case 1n+p SCon{c, t}:
95      shl(p, neg, t, SCon{c, f})

Uses (7)

Used by (1)