def U32Nat.dbl

bend-osdev-u32@0.1.0.0 · u32.bend:16

import bend-osdev-u32@0.1.0.0/u32.bend as U32
import Base

16# x times 2^n: x doubled n times
17def U32Nat.dbl(n: Nat, x: Nat) -> Nat:
18  match n:
19    case 0n:
20      x
21    case 1n+p:
22      Nat.double(U32Nat.dbl(p, x))

Uses (2)

Used by (230)