title: Haskell Print while in recursion?
body: <pre><code>foo:: Int -&gt; Int -&gt; Int
  foo z x = if (z &lt; 100) 
               then z * foo (z+(x*z)) z
               else z
  </code></pre>
  
  <p>How would you print out(the integer z) an output every time it gets called from itself?Can you have function that returns an IO and Int? Do you need a secondary function?</p>