title: Subscript range of [UInt8] - Swift
body: <p>So the issue I'm having is that I have an object with a argument in the init() that requires an [UInt8]. I want to be able to grab a range from another array and use that in the init. See example. </p>
  
  <pre><code>class Test {
  
      init(fromArray: [UInt8]) {
      // performs work
      }
  }
  
  let myStockArray: [UInt8] = [1,2,3,4,5,6,7,8] // reference array
  
  let test = Test(fromArray: myStockArray[1...4]) // doesn't work
  </code></pre>
  
  <p>How can I get this to work? The error I get is: Cannot subscript a value of type '[UInt8]' with an index of type 'CountableClosedRange' </p>