def mask
import stelliferous@0.0.2.0/proofs/word_power_of_two.bend as WordPowerOfTwoimport Base
17def mask(+width: Nat,depth: Nat) -> Word(width):
18 match width:
19 case 0n:
20 WNil{}
21 case 1n+rest:
22 match depth:
23 case 0n:
24 Word.zero(1n+rest)
25 case 1n+previous:
26 WCon{True{},mask(rest,previous)}