IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

mul

def mul(lhs: IntTuple, 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): The IntTuple whose elements will be multiplied.
  • rhs (Int): The scalar integer to multiply each element by.

Returns:

IntTuple: A new IntTuple with the same structure as the input but with all elements multiplied by the scalar value.

Was this page helpful?