Skip to content

Instantly share code, notes, and snippets.

@mgorbach
Created June 11, 2014 01:48
Show Gist options
  • Save mgorbach/bcfff16cc47dabf48c71 to your computer and use it in GitHub Desktop.
Save mgorbach/bcfff16cc47dabf48c71 to your computer and use it in GitHub Desktop.
Swift Simulator Mutability
1> let a = [1,2,3]
a: Int[] = size=3 {
[0] = 1
[1] = 2
[2] = 3
}
2> a.append(4)
3> a
$R2: Int[] = size=4 {
[0] = 1
[1] = 2
[2] = 3
[3] = 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment