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 nestedIntTuple
to flatten.
Returns:
A new IntTuple
containing all integer values in a flat structure.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!