Unflatten
Unflatten[flatList, listyList]⟹out
restructures the flat list flatList so it has the same structure as listyList.
Unflatten[flatList, listyList, pattern]⟹out
assumes listyList is a nested list containing only things that MatchQ with pattern.
Details
Input
Output