How do I create an immutable array in Swift?
A superficial reading of the docs would suggest you can just do
let myArray = [1,2,3]
It is now possible.
From Apple Developer
If you assign an array or a dictionary to a constant, that array or dictionary is immutable, and its size and contents cannot be changed.
So now
produces completely immutable array. Yay!