DEV Community

Discussion on: Generalizing Tree Traversal in Haskell with Typeclass

Collapse
 
shimmer profile image
Brian Berns

Good article. Thanks!

For trees, there are three orders to traverse it: pre-order, in-order, and post-order

These are all depth-first traversals, but of course there are other possible traversals as well. Breadth-first is often useful, but a bit more difficult to accomplish.