Maintain a sorted stack of things.