title: Swift: Generic parameter could not be inferred
body: <p>I got an error when compiling:</p>
  
  <pre><code>var beaconIDs = [BeaconID]()
  for i in 0..&lt;BeaconsStruct.uuidT.count {
  beaconIDs.append(BeaconID(UUIDString: BeaconsStruct.uuidT[i], major:  
  Int(BeaconsStruct.majorT[i])!, minor: Int(BeaconsStruct.minorT[i])!))
  }
  </code></pre>
  
  <p>The error is: Generic parametrer "Element" could not be inferred. </p>
  
  <p>BeaconID contains:</p>
  
  <pre><code>struct BeaconID: Equatable, CustomStringConvertible, Hashable {
      let proximityUUID: UUID
      let major: CLBeaconMajorValue
      let minor: CLBeaconMinorValue
  
      init(proximityUUID: UUID, major: CLBeaconMajorValue, minor: CLBeaconMinorValue) {
          self.proximityUUID = proximityUUID
          self.major = major
          self.minor = minor
      }
  
      init(UUIDString: String, major: CLBeaconMajorValue, minor: CLBeaconMinorValue) {
          self.init(proximityUUID: UUID(uuidString: UUIDString)!, major: major, minor: minor)
      }
  }
  </code></pre>
  
  <p>BeaconsStruct contains:</p>
  
  <pre><code>struct BeaconsStruct {
  static var uuidT: [String] = []
  static var minorT: [String] = []
  static var majorT: [String] = []
  static var lokalizacjaT: [String] = []
  }
  </code></pre>
  
  <p>Can I please ask you for help with that?</p>