title: What does the "head mismatch" compiler error mean?
body: <p>I tries to write code to print Z character.</p>
  
  <pre><code>zzzzzzz
       z
      z
     z
    z
   z
  zzzzzzz
  </code></pre>
  
  <p>But when I compile this code, it throws </p>
  
  <pre><code>D:\erlang\graphics&gt;erlc zeez2.erl
  d:/erlang/graphics/zeez2.erl:19: head mismatch
  d:/erlang/graphics/zeez2.erl:6: function zeez/3 undefined
  </code></pre>
  
  <p>I can't fixed this error. I didn't find what wrong in my could. <br/>
  Does one please suggest me. <br/>
  Thank you.</p>
  
  <pre><code>-module(zeez2).
  -export([main/0]).
  
  main() -&gt;
      L = 8,
      zeez( false ,1, L). % line 6
  
  zeez(true, M,M) -&gt;
      init:stop();
  
  zeez(false, M, N) -&gt;
      io:format("~p~n", [zeez(z, N-M)] ),
      zeez(M rem N =:= 0, M + 1, N );
  
  zeez(true, M, N) -&gt;
      io:format("~p~n", [zeez(space, N-M)] ), % line 16
      zeez(M rem N =:= 0, M + 1 , N );
  
  zeez(space, M) -&gt;
      io:format("~p~n", ["-" ++ zeez(space, M-1)] );
  
  zeez(space, 0) -&gt;
      "Z";
  
  zeez(z, M) -&gt;
      io:format("~p~n", ["Z" ++ zeez(z, M-1)] );
  
  zeez(z,0) -&gt;
      "Z".
  </code></pre>