title: Swift .map not providing expected data type
body: <p>I am trying to covert two different arrays of double into an array of MKMapPoint. I have an x array and y array. Both are nested inside of another array that holds other data types such as Strings and bools.</p>
  <p>Here is the model:</p>
  <pre><code>struct HostModel: Identifiable, Codable {
      var id: String
      var fenceX: [Double]
      var fenceY: [Double]
      var eventName: String
      var eventDescription: String
      var isEventPrivate: Bool
      
      private enum CodingKeys: String, CodingKey {
          case id
          case fenceX
          case fenceY
          case eventName
          case eventDescription
          case isEventPrivate
      }
  }
  </code></pre>
  <pre><code>for data in fenceData {
       let x = data.fenceX.map({ $0.self })
       let y = data.fenceY.map({ $0.self })
       print(&quot;\(x)&quot;)
       allMapPoints.append(MKMapPoint(x: x, y: y))
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/CmORt.png" rel="nofollow noreferrer">here is the data type $0.self shows</a></p>
  <p>I would think that this code would work since $0.self says it is a Double(see image above), however when I try to put it in the mkmappoint it gives me an error saying &quot;Cannot convert value of type '[Double]' to expected argument type 'Double'&quot;</p>
  <p>And the print statement shows this array:</p>
  <pre><code>[46476022.57489817, 46475952.06747695, 46475920.9612687, 46475989.39492689, 46476067.16044753, 46476150.11035207, 46476199.88028529, 46476096.19291651]
  </code></pre>
  <p>Why is .map not providing the data type it says it does?</p>