diff --git a/README.md b/README.md index ed20409..17f5d89 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Swift Result Builders for `Array` and `Set` ## Overview -Creating or modifying arrays and sets using [result builders](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/advancedoperators#Result-Builders) allows for inline logic such as `if/else`, `switch`, `for` loops and availability checking. Also commas are not needed to separate elements. +Creating or modifying arrays and sets using [result builders](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/advancedoperators#Result-Builders) allows for inline control statements such as `if`/`else`, `switch`, `for` loops and availability checking. Additionally, commas are not used to separate collection elements, yielding cleaner syntax than array and set literals. When used with [Combine](https://developer.apple.com/documentation/combine) for example, the result builder may be used to add `AnyCancellable` instances to a `Set` without calling `store(in:)` on each instance individually. @@ -52,15 +52,22 @@ mutating func insert(@Builder elements: () -> Self) func inserting(@Builder elements: () -> Self) -> Self ``` -## Minimum Requirements +## Installation + +### Swift Package Collection -- iOS `13.0` -- Swift `5.8` +
Expand / Collapse
-## Installation +``` +https://swiftpackageindex.com/Tinder/collection.json +``` + +
### Swift Package Manager +
Expand / Collapse
+ **Package Dependency** > Replace `` with the desired minimum version. @@ -71,16 +78,30 @@ func inserting(@Builder elements: () -> Self) -> Self **Target Dependency** -``` +```swift "CollectionBuilders" ``` -### Swift Package Collection +
-```swift -https://swiftpackageindex.com/Tinder/collection.json +### Xcode + +
Expand / Collapse
+ +**Package Dependency** + +``` +https://github.com/Tinder/CollectionBuilders.git ``` +**Target Dependency** + +``` +CollectionBuilders +``` + +
+ ## Supported Types The `Array` and `Set` result builders may be used with any `Element` type.