Phc.dec_go: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/phc.bend as Phc Lines 214-224 of bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/phc.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/phc.bend&start_line=214&end_line=224 import Base # The decimal digits of n before acc; fuel bounds the number of digits and # last says n < 10. def dec_go(fuel: Nat, +n: Nat, acc: String, last: Bool) -> String: match fuel last: case 0n _: acc case 1n+f True{}: SCon{dchar(n), acc} case 1n+f False{}: +q = Nat.div(n, 10n) dec_go(f, q, SCon{dchar(Nat.mod(n, 10n)), acc}, Nat.is_lt(q, 10n)) Uses (7): 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=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/phc.bend&name=dchar