def low_tail
import bend-collections@1.0.0.0/spec/crypto/keccak/main.bend as BendCollectionsimport Base
8def low_tail(w: U32, n: Nat) -> U32:
9 match n:
10 case 0n: 1
11 case 1n: U32.or(U32.and(w,255),256)
12 case 2n: U32.or(U32.and(w,65535),65536)
13 case 3n: U32.or(U32.and(w,16777215),16777216)
14 case _: w