yeah that's it
x was of course meant to be the type of x, but since you got the idea, everythign is the compiler may or may not optimize it though, so you'd better evaluate z