Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool, I didn't know that Rust did that (or have forgotten)!

But it sure looks like a map where we throw away the result. What I mean with that is that the loop construct must be served the iterations from an iterator, which may or may not use immutable data. I don't think you can make an immutable while loop, for example?

EDIT: Also, you better have a side-effect in that construct, otherwise it has no effect, right?



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: