Skip to content

Instantly share code, notes, and snippets.

@cennydavidsson
Created October 17, 2015 13:31
Show Gist options
  • Select an option

  • Save cennydavidsson/befe9fdfa3f1e407d90d to your computer and use it in GitHub Desktop.

Select an option

Save cennydavidsson/befe9fdfa3f1e407d90d to your computer and use it in GitHub Desktop.
func add(x: Int?, y: Int?) -> Int? {
guard let x = x, y = y where x.isEven else { return .None }
return x + y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment