Talk:Pre-order traversal
Not too clear, this one...
Yeh, I'll try to add some more detail to it.
As described this can surely only refer to binary trees, and this is, I think, the normal usage. However, if a tree is defined in terms of nodes, and list of trees - something like ...
e.g
data Tree a = Node a | (Node a, [ Tree a])
.... you might prefer
data Tree a = EmptyTree| (Node a, [ Tree a])
then the generalisation would be to recursively visit the node first, followed by each tree in the list in list order. Postorder could be defined in a similar fashion, but inorder would then be meaningless.
Someone might want to clarify this. I suspect that most functional programming practitioners would be happy with the generalisations.
David Martland 11:03 Apr 8, 2003 (UTC)
Start a discussion about improving the Pre-order traversal page
Talk pages are where people discuss how to make content on Wikipedia the best that it can be. You can use this page to start a discussion with others about how to improve the "Pre-order traversal" page.