title: Tuple function in Haskell
body: <p>I have the function</p>
  
  <pre><code>getCode :: [(a, Int)] -&gt; [a]
  getCode = concatMap (uncurry replicate)`
  </code></pre>
  
  <p>I expect </p>
  
  <pre><code>getCode [(‘a’,4),(‘b’,1),(‘a’,3),(‘b’,1)]
  </code></pre>
  
  <p>to output</p>
  
  <pre><code>“aaaabaaab” 
  </code></pre>
  
  <p>Instead I get an error that it does not match with the expected data type <code>[(a,Int)]</code>, and the actual data type is <code>[(Int,a)]</code>. How do i change it to make it work? Or any other way?</p>