Bin.to_nat: 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 237-244 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=237&end_line=244 import Base def to_nat(a: Bin) -> Nat: match a: case BZ{}: 0n case B0{r}: Nat.double(to_nat(r)) case B1{r}: 1n+Nat.double(to_nat(r)) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.double https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/bin.bend&name=Bin