def scale_binary
import bend-collections-laws-math@1.0.0.0/spec/lib/numeric.bend as Numericimport Base
86# Mathematical multiplication by 2^places, specified without machine shifts.
87def scale_binary(places: Nat, value: Nat) -> Nat:
88 match places:
89 case 0n:
90 value
91 case 1n+p:
92 Nat.double(scale_binary(p, value))