Does this work for now?

func ==<T : Equatable>(lhs:[T?], rhs: [T?]) -> Bool {
    let zipped = Zip2Sequence(lhs, rhs)

    return zipped.reduce(true) { (old, tuple) in
        old && (tuple.0 == tuple.1)
    }
}


On Fri, Jan 1, 2016 at 12:32 PM, Amir Michail via swift-evolution <
[email protected]> wrote:

> Example:
>
> [Int?]([1,2,nil]) == [Int?]([1,2,nil])
>
> This currently results in: “binary operator '==' cannot be applied to two
> '[Int?]' operands"
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to