Reputation: 1755
I am learning swift through Apple's documentation and I am on the Collection Types chapter and in the Sets section. One of the examples is this
var letters = Set<Character>()
but when I go to enter that I get this following error.
error: use of unresolved identifier 'Set'
var letters = Set<Character>()
there was a revision on sets according to their documentation, but nothing is helping me there.
Upvotes: 1
Views: 212
Reputation: 68440
Native Set
is available since Swift 1.2. Everthing points that you're using a lower version.
New native
Set
data structure — An unordered collection of unique elements that bridges with NSSet and provides value semantics like Array and Dictionary.
Upvotes: 2