I’m extending my break from Python to see how far I can go with Swift before I need a change of scenery again.
‘Documentation and API Reference’ under Xcode’s help bar is absolutely useful for further reading on any topics. I did not realise the benefits until I got to ‘Set’ even though it was introduced earlier in the book. There are actually several operations and examples listed there that are not in it.
I was on ‘Set’ and needed a solution to one of the problems. This came up when I Googled:
It didn’t work for me so I searched the documentation and found the below:
So, instead of myCities.isSupersetOf(yourCities), it should be myCities.isSuperset(of: yourCities).
I’m moving on to ‘Functions’ next. Wish me luck!