Anonymous user
Tree datastructures: Difference between revisions
→Procedural: golf->troll
(→{{header|AppleScript}}: Rethought use of glfing (see talk page); but please read new notes section of task please.) |
(→Procedural: golf->troll) |
||
Line 1,037:
<lang python>from pprint import pprint as pp
def to_indent(node, depth=0, flat=None):
Line 1,066 ⟶ 1,065:
print('Start Nest format:')
nest = ('RosettaCode', [('rocks', [('code', []), ('comparison', []), ('wiki', [])]),
('mocks', [('
pp(nest, width=25)
Line 1,088 ⟶ 1,087:
('wiki', [])]),
('mocks',
[('
... To Indent format:
Line 1,097 ⟶ 1,096:
(2, 'wiki'),
(1, 'mocks'),
(2, '
... To Nest format:
Line 1,106 ⟶ 1,105:
('wiki', [])]),
('mocks',
[('
===Functional===
|