You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
368 B

//
// ArrayExtension.swift
// Calculator
//
// Created by etudiant on 14/06/2023.
//
import Foundation
extension Array where Element: Equatable {
func compare(to other: [Element]) -> Bool {
self.count == other.count && self.allSatisfy({ elt in
other.contains { otherElt in
otherElt == elt
}
})
}
}