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
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
In Rust it is pretty simple using ranges and
Iterator
s -Playground
You say simple, but that looks really complicated to me haha
Thanks for sharing! I'm always interested in what the solutions look like in other languages 👍🏽
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!