I have a rather simple case. My input is an s string, what I slice from left to write. Every time CutFirst is called, it gives back as a return value a string AND it updates the input to be shorter (removing the first element cutting the string at a certain separator). This works perfectly.
Now I want to call a routine with the cut down parts:
Foo(CutFirst(s), CutFirst(s), CutFirst(s));
My common sense would say that in Foo the tree attributes are the three elements from left to right, but it is the opposite. I guess it is because, unless really needed, the attributes are evaluated right to left (it is a bit unclear to me why this is the standard). In this particular case it is really needed to make the evaluation of the functions in the attributes left to right, but the compiler does not notice that it is important this case.
How can I manually force it? (I have many more than three parameters, and so I want to avoid putting the cut pieces into variables first before calling Foo. Also because Foo might be called from elsewhere I do not want to change the order of the parameters either.)