Let
p(x,y)={x+yif x≥0 and y≥0,x−2yif x<0 and y<0,3x+yotherwise.
What is p(p(1,−1),p(−5,−2))?
@above, simply functional evaluation. For p(1,-1), then the case is 'otherwise' so we have 3*1-1=2. For p(-5,-2) we have case 2, so then -5-2(-2) equals -1. The outer function then has arguments 2 and -1, which is in the case 'otherwise' so we have 6-1=5.
So the final functional output is 5.