title: Initializing an array of Doubles in Swift 4
body: <p>I can initialize an array of <code>Int</code>s in Swift 4 as follows:</p>
  
  <pre><code>// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  let intArray = Array(1...10)
  </code></pre>
  
  <p>If I specify the array as an array of <code>Double</code>s like so:</p>
  
  <pre><code>let doubleArray1: [Double] = Array(1...100)
  </code></pre>
  
  <p>...the compiler says:</p>
  
  <blockquote>
    <p>Cannot convert value of type 'Array' to specified type '[Double]'</p>
  </blockquote>
  
  <p>If I try this:</p>
  
  <pre><code>let doubleArray1 = Array&lt;Double&gt;(1...100)
  </code></pre>
  
  <p>...the compiler says this...</p>
  
  <blockquote>
    <p>Cannot invoke initializer for type 'Array' with an argument
    list of type '(CountableClosedRange)'</p>
  </blockquote>
  
  <p>I got it to work using <code>map</code>, as follows:</p>
  
  <pre><code>// [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
  let doubleArrayMap = Array(1...10).map{Double($0)}
  </code></pre>
  
  <p>Is there a "cleaner" way to quickly initialize an array of <code>Doubles</code> <strong>without using <code>map</code></strong> in Swift?</p>