From ee6aff6200b4e9274654065b6d646b5e17e87323 Mon Sep 17 00:00:00 2001 From: pNre Date: Sat, 3 Jan 2015 11:47:31 +0100 Subject: [PATCH] Fixed `takeFirst` prototype --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0844040..40f8a45 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Set of Swift extensions for standard types and classes. -# Installation +# Installation Because of Xcode errors it's not possible to integrate this project with Cocoapods or as Embedded Framework. [Read more at Dev Forum](https://devforums.apple.com/message/983747#983747) @@ -10,9 +10,9 @@ Because of Xcode errors it's not possible to integrate this project with Cocoapo ## Use submodule and copy source code 1. Add ExSwift as a submodule 2. Open the `ExSwift` project folder, and drag `ExSwift` sub folder with source code into the file navigator of your Xcode project. Make sure you select add to target -3. Use it +3. Use it -``` swift +``` swift components.takeFirst() { $0.completed } ``` @@ -69,7 +69,7 @@ Name | Signature **`at`**|`at (indexes: Int...) -> Array` **`take`**|`take (n: Int) -> Array` **`takeWhile`**|`takeWhile (condition: (Element) -> Bool) -> Array` -**`takeFirst`**|`takeFirst (condition: (Element) -> Bool) -> Element` +**`takeFirst`**|`takeFirst (condition: (Element) -> Bool) -> Element?` **`tail`**|`tail (n: Int) -> Array` **`skip`**|`skip (n: Int) -> Array` **`skipWhile`**|`skipWhile (condition: (Element) -> Bool) -> Array`