title: Power function in prolog
body: <p>Exactly what's the Prolog definition for power function. I wrote this code and it give some errors I wanna know exact code for the power function.</p>
  
  <pre><code>pow(X,0,1).
  pow(X,Y,Z):-Y1=Y-1,pow(X,Y1,Z1),Z1=Z*X.
  </code></pre>
  
  <p>Anything wrong with this code?</p>