title: Haskell - Parse error in pattern
body: <p>This code: </p>
  
  <pre><code>validate :: Matrix-&gt; Bool
  validate x: [] = length x
  validate x: xs = (length x == lenght.head $ xs) == (validate tail xs)
  </code></pre>
  
  <p>produces this error: </p>
  
  <pre><code>Parse error in pattern: validate
  </code></pre>
  
  <p>Why?</p>
  
  <p>My aim is to return true if the matrix is in the correct patterns, ie the number of columns in all the rows are equal, or vice versa.</p>