title: Understanding this matrix transposition function in Haskell
body: <p>This matrix transposition function works, but I'm trying to understand its step by step execurtion and I don't get it.</p>
  
  <pre><code>    transpose:: [[a]]-&gt;[[a]]
      transpose ([]:_) = []
      transpose x = (map head x) : transpose (map tail x)
  </code></pre>
  
  <p>with </p>
  
  <pre><code>transpose [[1,2,3],[4,5,6],[7,8,9]]
  </code></pre>
  
  <p>it returns:</p>
  
  <pre><code> [[1,4,7],[2,5,8],[3,6,9]]
  </code></pre>
  
  <p>I don't get how the concatenation operator is working with map. It is concatenating each head of x in the same function call? How?</p>
  
  <p>is this </p>
  
  <pre><code>(map head x)
  </code></pre>
  
  <p>creating a list of the head elements of each list?</p>