title: List of pairs into pair of Lists Haskell
body: <p>Basically I have this exercise:
  Using list comprehensions, write a polymorphic function:</p>
  
  <pre><code>split :: [(a, b)] -&gt; ([a], [b])
  </code></pre>
  
  <p>which transforms a list of pairs (of any types) into a pair of lists. For example,</p>
  
  <pre><code>split [(1, 'a'), (2, 'b'), (3, 'c')] = ([1, 2, 3], "abc")
  </code></pre>
  
  <p>This was the way I wrote the function but it is not working:</p>
  
  <pre><code>split :: [(a, b)] -&gt; ([a], [b])
  split listOfPairs = (([a | a &lt;- listOfPairs]), ([b | b &lt;- listOfPairs]))
  </code></pre>
  
  <p>Can someone please explain why my solution doesn't work? Thank you!</p>