Tree datastructures: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Reduced the forest notation, for legibility, in the Data.Tree version) |
|||
Line 523: | Line 523: | ||
nativeForest = |
nativeForest = |
||
[ Node |
[ Node |
||
"RosettaCode" |
|||
[ Node |
|||
"rocks" |
|||
[ Node "code" [], |
|||
Node "comparison" [], |
|||
Node "wiki" [] |
|||
], |
|||
Node |
|||
"mocks" |
|||
[Node "trolling" []] |
|||
⚫ | |||
{ rootLabel = "comparison", |
|||
subForest = [] |
|||
}, |
|||
Node |
|||
{ rootLabel = "wiki", |
|||
subForest = [] |
|||
} |
|||
] |
|||
}, |
|||
Node |
|||
{ rootLabel = "mocks", |
|||
subForest = |
|||
[ Node |
|||
{ rootLabel = "trolling", |
|||
subForest = [] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
⚫ | |||
Node |
Node |
||
"Some lists" |
|||
[ Node "may" [], |
|||
[ |
Node "be" [], |
||
Node "irregular" [] |
|||
] |
|||
}, |
|||
Node {rootLabel = "be", subForest = []}, |
|||
Node {rootLabel = "irregular", subForest = []} |
|||
] |
|||
} |
|||
]</lang> |
]</lang> |
||
{{Out}} |
{{Out}} |