Terms and conditions
There are no goods or services being sold on https://fasterthanli.me: however, donations are accepted, through Patreon and GitHub Sponsors, and may in the future be accepted directly through a payment processor.
Anyone who is currently subcribed to me on either Patreon or GitHub Sponsors is hereafter referred to as a “sponsor”.
Sponsors may log in to this website using their Patreon or GitHub account and may, occasionally, read articles in “early access”, before they are made available for everyone.
Sponsors may cancel their subscription at any time and for any reason, and obtain a refund for the unused duration of their monthly/annual subscription.
By cancelling their subscription, sponsors understand they immediately lose the “early access” functionalities.
You can e-mail contact@fasterthanli.me if you have questions.
Here's another article just for you:
Recursive iterators in Rust
I’ve been looking for this blog post everywhere, but it doesn’t exist, so I guess it’s my turn to write about Some Fun with Rust.
The task at hand
Let’s say you have a recursive, acyclic data structure, like so:
struct Node {
values: Vec<i32>,
children: Vec<Node>,
}
This allows you to represent a tree-like structure:
[1, 2, 3]
/\
/ \
/ \
/ \
/ \
[4, 5] [6, 7]