Tree datastructures: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: separated ouput)
Line 673: Line 673:
function indent_to_nested(indent_struct indent, integer idx=1, level=1)
function indent_to_nested(indent_struct indent, integer idx=1, level=1)
function nested_to_indent(nested_struct nested, integer level=1)
function nested_to_indent(nested_struct nested, integer level=1)
-- (the next two are the constant declarations, now typed)
-- also make the output sequences better typed:
indent_struct indent = text_to_indent(text),
indent_struct indent = text_to_indent(text)
nested_struct nested = indent_to_nested(indent)[1]
nested_struct nested = indent_to_nested(indent)[1]
indent_struct r2i = nested_to_indent(nested)</lang>
indent_struct r2ichk = nested_to_indent(nested)</lang>


=={{header|Python}}==
=={{header|Python}}==