how to convert Range to Array
I tried:
let min = 50
let max = 100
let intArray:[Int] = (min...max)
get error Range
Interesting that you cannot (at least, with Swift 3 and Xcode 8) use Range<Int>
object directly:
let range: Range<Int> = 1...10
let array: [Int] = Array(range) // Error: "doesn't conform to expected type 'Sequence'"
Therefore, as it was mentioned earlier, you need to manually "unwrap" you range like:
let array: [Int] = Array(range.lowerBound...range.upperBound)
I.e., you can use literal only.
Put the Range in the init.
let intArray = [Int](min...max)