Bin.to_word: def of bend-lawful-stdlib@0.1.0.0 Import: import bend-lawful-stdlib@0.1.0.0/src/float/bin.bend as Bin Lines 224-235 of bend-lawful-stdlib@0.1.0.0/src/float/bin.bend: https://jend.leeeet.dev/read.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/bin.bend&start_line=224&end_line=235 import Base def to_word(n: Nat, a: Bin) -> Word(n): match n: case 0n: WNil{} case 1n+p: match a: case BZ{}: WCon{False{}, to_word(p, BZ{})} case B0{r}: WCon{False{}, to_word(p, r)} case B1{r}: WCon{True{}, to_word(p, r)} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/bin.bend&name=Bin