title: Find first element matching condition in Swift array (e.g. EKSource)
body: <p>I would like to find the first <code>EKSource</code> of type <code>EKSourceType.Local</code> with a "single"-line expression in Swift. Here is what I currently have:</p>
  
  <pre><code>let eventSourceForLocal = 
      eventStore.sources[eventStore.sources.map({ $0.sourceType })
          .indexOf(EKSourceType.Local)!]
  </code></pre>
  
  <p>Is there a better way of doing this (such as without mapping and/or with a generic version of <code>find</code>)?</p>