6 ms·
Or create an iterator and use Iterator::filter, which is probably a bit more idiomatic.
by qppo 6y ago
Or create an iterator and use Iterator::filter, which is probably a bit more idiomatic.
- ufo 6y agoIn many languages, creating a pull-based iterator for a tree-shaped data-structure can be tricky. It might require turning the recursion inside out to use an explicit stack... Do you know how well Rust can handle this? I'm not familiar with the details. In any case, while an iterator might help in the "ast_iterator" example, in the "ast_mapper" example I am not sure if there is a way around it.