title: Match non exhaustive in sml
body: <pre><code>fun p( x::xl ) =
    if x::xl = [] then []
    else [0];
  </code></pre>
  
  <p>It received a Warning: match non exhaustive. </p>
  
  <p>x::xl => ...</p>
  
  <p>What I want to do is: </p>
  
  <p>p( [] ) = [] </p>
  
  <p>When I do this, it gives a uncaught exception Match [nonexhaustive match failure] </p>