Created
November 2, 2015 07:21
-
-
Save NetguruGist/826430355616211687b2 to your computer and use it in GitHub Desktop.
error5 swift
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
func divide(dividend: Float, by divisor: Float) throws -> Float { | |
guard divisor != 0.0 else { | |
throw DivisionError.ByZero | |
} | |
return dividend / divisor | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment