An open API service indexing awesome lists of open source software.

https://github.com/n8henrie/treeiter

Example of depth-first iteration over a tree in Rust
https://github.com/n8henrie/treeiter

Last synced: 3 months ago
JSON representation

Example of depth-first iteration over a tree in Rust

Awesome Lists containing this project

README

        

# treeiter

It seems like I'm always wanting to do something with trees in Rust, and I have
a hard time figuring out how to make an iterator for e.g. depth-first search.

This is a repo where I can annotate code I found in [a really helpful Reddit
comment](https://www.reddit.com/r/rust/comments/fsbqwp/how_to_iterate_trees_nicely/fm1cc0j?utm_source=share&utm_medium=web2x&context=3).

Many thanks to [u/redartedreddit](https://www.reddit.com/user/redartedreddit/)!