Last active
October 25, 2016 11:34
-
-
Save jonathanpenn/c69e7b8485e29ffff598 to your computer and use it in GitHub Desktop.
So the JavaScript developers feel right at home...
This file contains 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
class NaNClass {} | |
let NaN = NaNClass() | |
@infix func == (n1: NaNClass, n2: NaNClass) -> Bool { | |
return false | |
} | |
@infix func != (n1: NaNClass, n2: NaNClass) -> Bool { | |
return true | |
} | |
@infix func + (a1: Array<Any>, a2: Array<Any>) -> String { | |
return "" | |
} | |
NaN == NaN // -> false | |
NaN != NaN // -> true | |
[] + [] // -> "" |
JensAyton
commented
Jun 8, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment