def Arrays.slots

bend-osdev-array@0.1.0.1 · array.bend:14

import bend-osdev-array@0.1.0.1/array.bend as Array
import Base

14# 2^d, the slot count of an array of depth d
15def Arrays.slots(d: Nat) -> Nat:
16  match d:
17    case 0n:
18      1n
19    case 1n+p:
20      Nat.double(Arrays.slots(p))

Uses (2)

Used by (71)