-
-
Save krzyzanowskim/e049b278c9e84639fe22 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 of Int | |
var array:[Int] = [1,2,3,4,5] | |
// In fact Slice is returned, not Array | |
// [2,3,4] | |
var subslice:Slice<[Int]> = Slice(base: array, bounds: Range<Int>(start: 1, end: 4)) | |
// For Sub Array, you need to create array with slice | |
var subarray:[Int] = Array(subslice) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment