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

flatten

def flatten(t: IntTuple) -> IntTuple

Flatten a nested IntTuple into a single-level IntTuple.

This function converts a hierarchical IntTuple structure into a flat sequence of integer values, preserving the order of elements.

Args:

  • t (IntTuple): The nested IntTuple to flatten.

Returns:

IntTuple: A new IntTuple containing all integer values in a flat structure.

Was this page helpful?