LegacyCiphers.lc.word_lsb: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as LegacyCiphers Lines 215-226 of bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend&start_line=215&end_line=226 import Base # the n-bit word whose bits, least significant first, are the first n of bs # (False past the end) def lc.word_lsb(n: Nat, bs: List<&2, Bool>) -> Word(n): match n: case 0n: WNil{} case 1n+p: match bs: case Nil{}: WCon{False{}, lc.word_lsb(p, Nil{})} case Con{h, t}: WCon{h, lc.word_lsb(p, t)} 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=List 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