Skip to main content
Log in

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]): The IntTuple 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.