>>106632335
I think most languages supporting destructuring to do something like
(r, w) = (f(r, w), g(r, w))
should mostly work. Pic related is me trying it in javascript real quick (I forgot the w argument but the point is that the old value of r was used in the g() call, hence the final value of w is 20 and not 22).
Off the top of my head, rust and python can also do this.