Talk:Tree from nesting levels: Difference between revisions

Content added Content deleted
(/* multiple level 1 siblings implies *lists* of trees (forests), rather than single 'trees')
Line 58: Line 58:
In which case, the outputs shown are not, in fact, self-consistent ...
In which case, the outputs shown are not, in fact, self-consistent ...


Your first output example `[]` is indeed a '''tree''' (the virtual root, with no descendants).
Your first output example `[]` could indeed be a '''tree''' (the virtual root, with no descendants),
but it could also be an empty list of trees.


Those that follow, however, show '''lists''' of trees ('forests' if you like).
Those that follow, however, clearly show '''lists''' of trees ('forests' if you like).


If you really want each output example to have the same consistent type, and you want that to be "tree", in each case, rather than "tree" in one case, and "list of trees" in the others, then from the second example onwards, you really need an additional pair of flanking brackets.
If you really want each output example to have the same consistent type, and you want that to be "tree", in each case, rather than "tree" in one case, and "list of trees" in the others, then from the second example onwards, you really need an additional pair of flanking brackets.