This is a Swift microframework which implements a Dictionary-backed Set.
// Union
Set(1, 2, 3) + Set(3, 4, 5) // == Set(1, 2, 3, 4, 5)
// Difference
Set(1, 2, 3) - Set(2, 3) // == Set(1)
// Intersection
Set(1, 2, 3) & Set(3, 4, 5) // == Set(3)
See Set.swift
for more details.
-
Add this repo as a submodule in e.g.
External/Set
:git submodule add https://github.com/robrix/Set.git External/Set
-
Drag
Set.xcodeproj
into your.xcworkspace
/.xcodeproj
. -
Add
Set.framework
to your target’sLink Binary With Libraries
build phase. -
You may also want to add a
Copy Files
phase which copiesSet.framework
(and any other framework dependencies you need) into your bundle’sFrameworks
directory. If your target is a framework, you may instead want the client app to includeSet.framework
.