7 ms·
Whenever iterator design comes up, I always have to refer to munificent's excellent article: https://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-
by thomastay 2y ago
Whenever iterator design comes up, I always have to refer to munificent's excellent article: https://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/ https://journal.stuffwithstuff.com/2013/01/13/iteration-insi...
tldr: The gold standard is if your iterator syntax / syntaxes can support these two types of iteration:
1. Interleaving two sequences
2. In-order tree traversal