title: How can I bind the second argument in a function but not the first (in an elegant way)?
body: <p>Is there a way in Haskell to bind the second argument but not the first of a function without using lambda functions or defining another "local" function?</p>
  
  <p>Example. I have a binary function like:</p>
  
  <pre><code>sub :: Int -&gt; Int -&gt; Int
  sub x y = x - y 
  </code></pre>
  
  <p>Now if I want to bind the first argument, I can do so easily using (sub someExpression):</p>
  
  <pre><code>mapSubFrom5 x = map (sub 5) x
  
  *Main&gt; mapSubFrom5 [1,2,3,4,5]
  [4,3,2,1,0]
  </code></pre>
  
  <p>That works fine if I want to bind the first n arguments without "gap".</p>
  
  <p>If I want to bind the second argument but not the first, the two options I am aware of are more verbose:</p>
  
  <p>Either via another, local, function:</p>
  
  <pre><code>mapSub5 x = map sub5 x
      where sub5 x = sub x 5
  
  *Main&gt; mapSub5 [1,2,3,4,5]
  [-4,-3,-2,-1,0]
  </code></pre>
  
  <p>Or using lambda:</p>
  
  <pre><code>mapSub5 x = map (\x -&gt; sub x 5) x
  </code></pre>
  
  <p>While both are working fine, I like the elegance of "sub 5" and wonder if there is a similarly elegant way to bind the n-th (n > 1) argument of a function?</p>