Created
July 3, 2018 16:12
-
-
Save PavelGnatyuk/9533f3ca0ab8a07102fbc80dae7e3f90 to your computer and use it in GitHub Desktop.
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
var isDebug = true | |
func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String) { | |
guard isDebug else { return } | |
if condition() { | |
print(message()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment