From humble beginnings at an MSP, I've adventured through life as a sysadmin, into an engineer, and finally landed as a developer focused on fixing problems with automation.
L.A. based web developer slowly parsing through Stack Overflow. If you like hot web dev tips or stories about being a freelancer, check out my newsletter: https://codenutt.substack.com/p/coming-soon
I mean, JavaScript has similar constructs:
This could be further simplified with generator functions to get the iterator behavior seen in the Rust example.
Yep, that is definitely one way to do it. I personally prefer more legible code (because I'm a simple human), but this gets the job done.
Thanks for sharing!