def multiply_bits

stelliferous@0.0.2.0 · math_checked_word.bend:20

import stelliferous@0.0.2.0/math_checked_word.bend as MathCheckedWord
import Base

20def multiply_bits(width: Nat,bits: Word(width),+right: Nat,+limit: Nat) -> Maybe<&2,Nat>:
21  match width bits:
22    case 0n WNil{}: Some{0n}
23    case 1n+rest WCon{bit,tail}: multiply_step(bit,right,multiply_bits(rest,tail,right,limit),limit)

Uses (6)

Used by (1)