Skip to content

Instantly share code, notes, and snippets.

@DaveWoodCom
Created August 5, 2014 09:36
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 DaveWoodCom/ce3a3a6467a7fc7a71a3 to your computer and use it in GitHub Desktop.
Save DaveWoodCom/ce3a3a6467a7fc7a71a3 to your computer and use it in GitHub Desktop.
if optional != nil is fugly!
public extension Optional {
public var exists: Bool {
return (self != nil)
}
public var notExists: Bool {
return (self == nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment