Mojo function
to_nest
to_nest(nested: IntTuple[origin], flat: IntTuple[origin]) -> IntTuple
Nests a flat IntTuple according to the structure of a nested IntTuple. For example: to_nest((2, (3, 4), 5), (1, 2, 3, 4))
returns (1, (2, 3), 4)
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!