title: Partial application left to right
body: <p>I started with haskell yesterday and am still completely lost on the shore of this brave new world. Now I have run into the following issue:</p>
  
  <p>Let's assume I have some function that does some magic to an integer and another variable:</p>
  
  <pre><code>makeTuple :: Int -&gt; a -&gt; (Int, a)
  makeTuple n x = (n, x)
  </code></pre>
  
  <p>Now I want to apply this function to all elements of a list. So far no problem, as mapping is your daily bread and butter in python (where I come from), too.</p>
  
  <pre><code>makeTupleList :: Int -&gt; [a] -&gt; [ (Int, a) ]
  makeTupleList n x = map (makeTuple n) x
  </code></pre>
  
  <p>As far as I understand, the binary function makeTuple is applied partially with the integer n and hence becomes a unary function which can be mapped to each element of x. So far, all is well.</p>
  
  <p>But what do I do when the makeTuple function has another signature, like:</p>
  
  <pre><code>makeTuple2 :: a -&gt; Int -&gt; (Int, a)
  makeTuple2 x n = (n, x)
  </code></pre>
  
  <p>Many ways lead to Rome: the effect is the same, but the way is another. Now obviously the mapping doesn't work anymore: The function expects an Int and gets an a.</p>
  
  <pre><code>makeTupleList2 :: Int -&gt; [a] -&gt; [ (Int, a) ]
  makeTupleList2 n x = map (makeTuple2 n) x -- boolshit
  </code></pre>
  
  <p>This was to be expected. My -maybe too pythonic- workaround is using another function to pass the parameters where they should go:</p>
  
  <pre><code>makeTupleList2 :: Int -&gt; [a] -&gt; [ (Int, a) ]
  makeTupleList2 n x = map (\x -&gt; makeTuple2 x n) x
  </code></pre>
  
  <p><strong>Question:</strong>
  What is the preferred functional, haskell-style way of partially applying functions when the parially applied parameters isn't the leftmost?</p>