title: Using the split function in Swift 2
body: <p>Let's say I want to split a string by an empty space. This code snippet works fine in Swift 1.x. It does not work in Swift 2 in Xcode 7 Beta 1.</p>
  
  <pre><code>var str = "Hello Bob"
  var foo = split(str) {$0 == " "}
  </code></pre>
  
  <p>I get the following compiler error:</p>
  
  <pre><code>Cannot invoke 'split' with an argument list of type '(String, (_) -&gt; _)
  </code></pre>
  
  <p>Anyone know how to call this correctly?</p>
  
  <p><strong>Updated</strong>: Added a note that this was for the Xcode 7 beta 1.</p>