It does, pop the left hand nodes in a colour adjust, then assign the square scalar to the input of the colour adjust shader. That then goes to the colour function fine.
Disabling the other unused nodes won't work, you'll have to delete them or, place them inside their own container. I think a group node should work like the colour adjust shader, it's a good node to use as a container, though, as it only has one input.