Skip to main content
Log in

Mojo function

flatten

flatten(t: IntTuple[origin]) -> 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[origin]): The nested IntTuple to flatten.

Returns:

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