def multiply_right
import stelliferous@0.0.2.0/math_checked_word.bend as MathCheckedWordimport Base
import stelliferous@0.0.2.0/machine_limits.bend as Machine
34# Unit products already fit a word. Shapes and contiguous strides frequently
35# use them; returning the operand avoids the 32-step natural Horner traversal.
36def multiply_right(unit: Bool,left: U32,right: U32) -> Maybe<&2,U32>:
37 match unit:
38 case True{}: Some{left}
39 case False{}: multiply_bounded(left,right,Machine.word_max())