Skip to main content
Commonmark migration
Source Link

###Internal`CopyListStructure

Internal`CopyListStructure

Examples:

orig = {{{}, {Exp[1]}, 3, {{{{a}}}, c}}}; Internal`CopyListStructure[orig, Range[4]] 
{{{}, {1}, 2, {{{{3}}}, 4}}} 
list = {{{2, 3}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}}; list1 = Flatten[list, 1]; list1[[1]] = {2, 8}; Internal`CopyListStructure[list, Flatten@list1] 
 {{{2, 8}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}} 

###Internal`CopyListStructure

Examples:

orig = {{{}, {Exp[1]}, 3, {{{{a}}}, c}}}; Internal`CopyListStructure[orig, Range[4]] 
{{{}, {1}, 2, {{{{3}}}, 4}}} 
list = {{{2, 3}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}}; list1 = Flatten[list, 1]; list1[[1]] = {2, 8}; Internal`CopyListStructure[list, Flatten@list1] 
 {{{2, 8}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}} 

Internal`CopyListStructure

Examples:

orig = {{{}, {Exp[1]}, 3, {{{{a}}}, c}}}; Internal`CopyListStructure[orig, Range[4]] 
{{{}, {1}, 2, {{{{3}}}, 4}}} 
list = {{{2, 3}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}}; list1 = Flatten[list, 1]; list1[[1]] = {2, 8}; Internal`CopyListStructure[list, Flatten@list1] 
 {{{2, 8}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}} 
Source Link
kglr
  • 403.4k
  • 18
  • 501
  • 959

###Internal`CopyListStructure

Examples:

orig = {{{}, {Exp[1]}, 3, {{{{a}}}, c}}}; Internal`CopyListStructure[orig, Range[4]] 
{{{}, {1}, 2, {{{{3}}}, 4}}} 
list = {{{2, 3}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}}; list1 = Flatten[list, 1]; list1[[1]] = {2, 8}; Internal`CopyListStructure[list, Flatten@list1] 
 {{{2, 8}, {2, 4}}, {{{3, 4}}}, {{5, 6}, {7, 8}}}