Mojo function
mul
mul(lhs: IntTuple[origin], rhs: Int) -> IntTuple
Multiply each element in an IntTuple
by a scalar value.
This function creates a new IntTuple
where each element (at any nesting level)
is multiplied by the provided integer value.
Args:
- lhs (
IntTuple[origin]
): TheIntTuple
whose elements will be multiplied. - rhs (
Int
): The scalar integer to multiply each element by.
Returns:
A new IntTuple
with the same structure as the input but with all elements multiplied by the scalar value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!