def word_bits
import bend-collections@1.0.0.0/src/containers/bitlist.bend as Bitlistimport Base
import bend-collections@1.0.0.0/src/containers/bitset.bend as B
223# The low m bits of x, bit 0 first, in front of rest.
224def word_bits(m: Nat, +x: U32, rest: List<&2, Bool>) -> List<&2, Bool>:
225 match m:
226 case 0n:
227 rest
228 case 1n+p:
229 Con{B.low(x), word_bits(p, U32.shr(x), rest)}