Flatten a nested list iterator
A list holds integers and other lists, nested to any depth. Write an iterator with next() and has_next() that returns the integers in order. Do it lazily with a stack of positions rather than flattening everything up front, and make sure empty inner lists are skipped.
No answer yet. Write the first one; the best answer gets endorsed.
