I have a problem that I can\'t wrap my head around.
My input is a flat list like this: (and I can tell what\'s the next operator, and what\'s the next element)