Created
September 11, 2017 15:00
-
-
Save adamchalmers/5b7c7129f722118c3b06a7dd9ad049a0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let array = Array(0..<10) | |
let slice = array[2..<5] | |
// Mixing Array/ArraySlice compiles! | |
print(extend(array, withNewElems: array)) | |
print(extend(array, withNewElems: slice)) | |
print(extend(slice, withNewElems: slice)) | |
// Mixing Ints/Bools doesn't compile! | |
print(extend(array, withNewElems: [true, false])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment