RosettaCodeData/Task/Tree-datastructures/Zkl/tree-datastructures-2.zkl

14 lines
456 B
Plaintext

tree:=L("RosettaCode",
L("rocks","code","comparison","wiki"),
L("mocks","golfing") );
println("Nest tree internal format:\n",tree.toString(*,*));
println("Formated:\n",nestToString(tree));
indentTree:=nestToIndent(tree);
println("To indent format:\n",indentToString(indentTree));
nestTree:=indentToNest(indentTree);
println("\nIndent to nested format:\n",nestTree);
println("Is this tree the same as what we started with? ",nestTree==tree);