title: How to compare elements of two arrays
body: <p>I want to compare the elements of two arrays and check if they are equal.
  I already tried various solutions but nothing really works.</p>
  
  <p>I tried the solution from 
  <a href="https://stackoverflow.com/questions/39161168/how-to-compare-two-array-of-objects">How to compare two array of objects?</a></p>
  
  <p>This is my object:</p>
  
  <pre><code>struct AccountBalance: Decodable {
      let balance: Double
      let currency: String
  
      init(balance: Double, currency: String ) {
          self.currency = currency
          self.balance = balance
      }
  
      enum CodingKeys: String, CodingKey {
          case currency = "Currency"
          case balance = "Balance"
      }
  }
  </code></pre>
  
  <p>This is the code from the link I tried:</p>
  
  <pre><code>let result = zip(accountBalance, getsSaved).enumerate().filter() {
                  $1.0 == $1.1
                  }.map{$0.0}
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>Closure tuple parameter '(offset: Int, element: (AccountBalance, AccountBalance))' does not support destructuring with implicit parameters
  </code></pre>