title: currying in Swift, new declaration syntax in future?
body: <p>Just installed Swift today in Linux to check it out.</p>
  
  <p>Trying a small example of currying results in a warning that the syntax for currying will change in the future, however I could not find anything about what this new syntax looks like.</p>
  
  <p>The currying example I tried:</p>
  
  <pre><code>func do_stuff(x: Int) (y: Int) (z: Int) -&gt; Int {
      return (x - y) * z
  }
  let curry_fun = do_stuff(42)
  let x = curry_fun(y: 7)(z: 3)
  </code></pre>
  
  <p>compiling this example results in following warning:</p>
  
  <pre><code>warning: curried function declaration syntax will be removed in a future version of Swift; use a single parameter list
  func do_stuff(x: Int) (y: Int) (z: Int) -&gt; Int {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
                      ,        ,
  </code></pre>
  
  <p><strong>So what does currying then look like in future swift?</strong></p>
  
  <p><em>I did try something like</em> <code>func do_stuff(x: Int, y: Int, z: Int) -&gt; Int...</code> <em>, however I couldn't find a way to do currying with that function..</em></p>