Skip to main content
Log in

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).