#SIDU (Stuff I Don't Understand) 1/?

Today's thread of unknown length concerns iterators in Rust. If you know a Rust wizard, please bounce this off them.

Rust seems to *really* want you to use Iterators. If you're looping over a collection of items, the language and standard library really want you to express it as an Iterator so that you can use all the cool Iterator methods on it.

But as a guy who's been writing C for decades, I don't understand how this works at a machine level.

#SIDU 4/?

In the instant case, `neighbors()` only returns four elements. But what if it was 100K elements? Does the Iterator have to loop 100K times before `choose()` gets called?

Now, "obviously" that is not what is happening, because that would be monstrously inefficient. But in order for that to *not* happen, it seems to me that `choose()` needs to somehow "reach back" to the previous method and tell the Iterator, "Look, you don't need to loop over everything; just give me element N."