I admit my pseudo-code ignores some of the details, making it look easier than it is.
My front function has to deal with the end of a list and provider a proper comparison when no item is available. It can be done this way.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.