def pow2

bend-collections-laws-crypto@1.0.0.0 · spec/lib/common.bend:6

import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as Common
import Base

6# 2^k as a natural number.
7def pow2(k: Nat) -> Nat:
8  match k:
9    case 0n:
10      1n
11    case 1n+p:
12      Nat.double(pow2(p))

Uses (2)

Used by (199)