def of_word
import bend-lawful-stdlib@0.1.0.0/src/float/bin.bend as Binimport Base
214# the n low bits of a word, and back
215def of_word(n: Nat, w: Word(n)) -> Bin:
216 match n:
217 case 0n:
218 BZ{}
219 case 1n+p:
220 match w:
221 case WCon{b, t}:
222 cons(b, of_word(p, t))
Uses (5)
Used by (0)
No other definition uses this definition.