title: Input parameter to closure in Swift with brackets
body: <p>I am going through the following tutorial on <code>RxSwift</code>:</p>
  
  <p><a href="http://adamborek.com/thinking-rxswift/" rel="noreferrer">http://adamborek.com/thinking-rxswift/</a></p>
  
  <p>and having trouble understanding the following pattern:</p>
  
  <pre><code>           searchBar.rx.text.orEmpty
  ------------&gt; .flatMap { [spotifyClient] query in
                     return spotifyClient.rx.search(query: query)
               }.map { tracks in
                     return tracks.map(TrackRenderable.init)
               }
  </code></pre>
  
  <p>This square brackets input parameter: <code>[spotifyClient] query</code> seems very weird for me. I looked over official <code>Apple</code> documentation for closures and functions and I can not see any examples of such input parameters. In <code>Objective C</code> this would not bother me much, but it is <code>Swift</code>. Could anyone explain, what this parameter means here?</p>