jgsamudio
6/12/2018 - 2:11 AM

Array Conditional Conformance

Array Conditional Conformance

struct UserInfo {
    
    let userArray1 = [User(userId: "1", email: "something@gmail.com", lovesFruits: true),
                      User(userId: "2", email: "something@gmail.com", lovesFruits: true)]
    
    let userArray2 = [User(userId: "1", email: "something@gmail.com", lovesFruits: false),
                      User(userId: "2", email: "something@gmail.com", lovesFruits: false)]
    
    func areArraysEqual() -> Bool {
        return userArray1 == userArray2
    }
}