Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created January 10, 2013 01:01
Show Gist options
  • Save MichaelDrogalis/4498488 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/4498488 to your computer and use it in GitHub Desktop.
(defn divider [a b]
(try
(/ a b)
(catch java.lang.ArithmeticException e
"Dividing by 0!")))
(divider 10 2) ; => 5
(divider 10 0) ; => Dividing by 0!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment