Created
November 15, 2016 08:24
-
-
Save mcany/e412147d1e95efe15e0304577b0c3774 to your computer and use it in GitHub Desktop.
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
extension Bool { | |
init<T : IntegerType>(_ integer: T) { | |
if integer == 0 { | |
self.init(false) | |
} else { | |
self.init(true) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment