List rooted trees: Difference between revisions

m
fix markup
m (syntax highlighting fixup automation)
m (fix markup)
Line 1,341:
ReplacePart[config, pos -> Append[Extract[config, pos], bag[]]]
With[{n = 5}, Nest[Addbags, {cabinet[bag[]]}, n - 1] // Column]</syntaxhighlight>
The output can be viewed as a tree graph by replacing the last line with <Langsyntaxhighlight Mathematicalang="mathematica">With[{n = 5}, TreeForm /@ Nest[Addbags, {cabinet[bag[]]}, n - 1]]</syntaxhighlight>
 
{{out}}
10,327

edits