Swift: Can closures be used like lambdas to find objects in array?
<p>I'm using swift and I have an array that I'd like to search for an object using the value of one of its properties.</p>

<p>In C# I'd use a lambda to find my object like so:
<code>return myArray.FirstOrDefault(obj -&gt; obj.Name == "Foo");</code></p>

<p>I've heard that swift uses closures instead of lambdas, so is there a similar way to accomplish this one-line task in swift using Closures? </p>

<p>I've checked apple's documentation about Closures <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html" rel="nofollow">here</a> and everything seems to require writing a separate function. It just feels like there's probably an easy way to do this in swift that I haven't found yet.</p>