title: How to Fetch Multiple Types From CloudKit using CKRecord.ID?
body: <p>When fetching multiple types from <code>CloudKit</code> using <code>CKRecord.ID</code> I get the following error.</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Cannot invoke 'map' with an argument list of type '(@escaping (CKRecord.ID, String, CKAsset, Int) -&gt; Lib)'
  </code></pre>
  
  <p><strong>CloudKit Fetch Function</strong></p>
  
  <pre><code>static func fetch(_ recordID: [CKRecord.ID], completion: @escaping (Result&lt;[Lib], Error&gt;) -&gt; ()) {
      let recordID: [CKRecord.ID] = recordID
      let operation = CKFetchRecordsOperation(recordIDs: recordID)
      operation.qualityOfService = .utility
  
      operation.fetchRecordsCompletionBlock = { (record, err) in
          guard let record = record?.values.map(Lib.init) ?? [] //returns error here
          else {
              if let err = err {
                  completion(.failure(err))
              }
              return
          }
  
          DispatchQueue.main.async {
              completion(.success(record))
          }
      }
  
      CKContainer.default().publicCloudDatabase.add(operation)
  }
  </code></pre>
  
  <p><strong>Lib</strong></p>
  
  <pre><code>struct Lib {
      var recordID: CKRecord.ID
      var name: String
      var asset: CKAsset
      var rating: Int
  }
  </code></pre>
  
  <p>How can I retrieve multiple types from <code>CloudKit</code> using the <code>CKRecord.ID</code>?</p>