Last active
September 2, 2015 18:45
-
-
Save k0nserv/86b0c7a7888233f8b32c to your computer and use it in GitHub Desktop.
This code makes xCode sad under xCode 7 Beta 6(7A192o)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func nestedEquality<T>(lhs: [[T]], _ rhs: [[T]], equal: ([T], [T]) -> Bool) -> Bool { | |
if lhs.count != rhs.count { | |
return false | |
} | |
for var i = 0; i < lhs.count; i++ { | |
if false == equal(lhs[i], rhs[i]) { | |
return false | |
} | |
} | |
return true | |
} |
Thing is the condition varies from time to time, anyways it sovled itself somehow :)
https://github.com/k0nserv/SwiftObjLoader/blob/master/SwiftObjLoader/Geometry.swift#L39-L109
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm pretty sure == do this to nested arrays if T is Equitable
Here is an cleaner and clearer way in my opinion to write that for loop