title: Pari/GP: user defined functions
body: <p>I have defined a couple of functions of arity 1, say <code>func1(-)</code> and <code>func2(-)</code>. I have tested them and seen that they actually do what they are supposed to.</p>
  
  <p>I wish to define a third function, say <code>func3(-)</code>, that outputs the difference of <code>func1(-)</code> and <code>func2(-)</code>. This is what I do</p>
  
  <pre><code>func3(k) = {j=func1(k)-func2(k); print(j)}
  </code></pre>
  
  <p>Nevertheless, it doesn't return what it ought to. Let us suppose that <code>func1(5)</code> outputs 10 and <code>func2(5)</code> outputs 2. Then, <code>func3(5)</code> ought to output an 8, right? It returns instead the output of <code>func1(5)</code> in one row, the output of <code>func2(2)</code> in another row, and then a zero (even though the difference of the corresponding outputs is not 0).</p>
  
  <p>Do you know what's wrong with the definition of <code>func3(-)</code>?</p>