title: read a list of integers from another function and then square it
body: <p>I want to build a function called <code>Square(N)</code>. This function will take a list of integers that comes from a previous function that I have built, and then it will return the list of integers it received, only each number is now squared.</p>
  
  <p>So if the read list is <code>[1,2,3,4]</code> then it should return <code>[1,4,9,16]</code>. My function is as follows:</p>
  
  <pre><code>Square(N) when N &gt; 0 -&gt; Square(digitize(N));
  Square([]) -&gt; [];
  Square([H|T]) -&gt; [H*H|Square(T)].
  </code></pre>
  
  <p>And if you wonder what <code>digitize(N)</code> does, it reads in any number and then displays each digit of that number into a list. The digitize function is as follows:</p>
  
  <pre><code>digitize(N) when N &lt; 10 -&gt; [N];
  digitize(N) -&gt; digitize(N div 10)++[N rem 10].
  </code></pre>
  
  <p>The result I got when compiling the function is an error:</p>
  
  <blockquote>
    <p><code>an error occurred when evaluating an arithmetic expression</code></p>
  </blockquote>