def Int.bits

bend-kit-int@0.2.0.0 · int.bend:13

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

13# The low n bits of k: k mod 2^n.
14def Int.bits(n: Nat, k: Nat) -> Word(n):
15  Int.bits.go(n, Nat.divmod(k, 2n))

Uses (4)

Used by (5)