Skip to content

Instantly share code, notes, and snippets.

@PavelGnatyuk
Created July 3, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PavelGnatyuk/9533f3ca0ab8a07102fbc80dae7e3f90 to your computer and use it in GitHub Desktop.
Save PavelGnatyuk/9533f3ca0ab8a07102fbc80dae7e3f90 to your computer and use it in GitHub Desktop.
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