-
-
Save krzyzanowskim/b9a369c2b1ef4f5b197f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define array | |
var array:[Int] = [1,2,3,4,5] | |
// get a slice of array | |
let subslice = Slice(base: arr, bounds: Range<Int>(start: 1, end: 4)) | |
// and update second element of array | |
array[1] = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment