Hacker News new | ask | show | jobs
by thomastay 724 days ago
Whenever iterator design comes up, I always have to refer to munificent's excellent article: 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