I'm contemplating using iterators for modelling streams of values but can't find a way to get the next value yielded by iterator within my code rather than by loop. Is it possible? Is it discouraged?
For that you need to use closure iterators. For an example of how to use them see "Appendix A"in this article: https://peterme.net/asynchronous-programming-in-nim.html. It's about asynchronous programming, but the appendix explains how async in Nim is implemented via closure iterators and shows an example of how they work.