Rather just do a less than check. Looks cleaner :/
Clean up the stack example, add a queue example to match.