Assigning solve result to function



Hello,

I've got an equation, for example 'x_1 + x_2 = 0' (of course real case 
is not so simple, but it's enough for demonstration) and I need to get 
function F(x_2) from it.

I tried to use solve for it 'solve(x_1 + x_2 = 0, x_1)' and get 'x_1 = - 
x_2'. Now I couldn't find, how to extract right part of solve result 
into function. Just 'F(x_2) := solve(x_1 + x_2 = 0, x_1)' of course 
doesn't work, it results to 'x_1 = -x_2' instead of wanted '- x_2'.

Can anybody help with it? And maybe I'm on the wrong path and shouldn't 
use 'solve' for it?

Thanks in advance.

-- 
Best Regards, 
Dmitry Vinokurov 
<d.vinokuroff at gmail.com>