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

mul

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.