title: Haskell Invert Pair
body: <p>Wondering if I could get some help writing this function. I am trying to create a function that inverts each "pair" in the list.</p>
  
  <pre><code>module Invert where
  invert :: [(a,b)] -&gt; [(b,a)]
  invert [(a,b)] = [(b,a)]
  </code></pre>
  
  <p>When I enter <code>invert [(3,1) (4,1) (5,1)]</code>... it is supposed to give me <code>[(1,3) (1,4) (1,5)</code>... But it gives me...</p>
  
  <hr>
  
  <pre><code>*Invert&gt; [(3,1) (4,1) (5,1)]
  
  &lt;interactive&gt;:2:2:
      The function `(3, 1)' is applied to two arguments,
      but its type `(t0, t1)' has none
      In the expression: (3, 1) (4, 1) (5, 1)
      In the expression: [(3, 1) (4, 1) (5, 1)]
      In an equation for `it': it = [(3, 1) (4, 1) (5, 1)]
  </code></pre>