def lc.word_lsb

bend-osdev-cipher-core@0.1.0.0 · cipher_core.bend:212

import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as CipherCore
import Base

212# the n-bit word whose bits, least significant first, are the first n of bs
213# (False past the end)
214def lc.word_lsb(n: Nat, bs: List<&2, Bool>) -> Word(n):
215  match n:
216    case 0n:
217      WNil{}
218    case 1n+p:
219      match bs:
220        case Nil{}:
221          WCon{False{}, lc.word_lsb(p, Nil{})}
222        case Con{h, t}:
223          WCon{h, lc.word_lsb(p, t)}

Uses (6)

Used by (0)

No other definition uses this definition.