Skip to content

Instantly share code, notes, and snippets.

@infinite-Joy
Created June 22, 2017 16: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 infinite-Joy/c546d45ef64d6f3e450087e037997742 to your computer and use it in GitHub Desktop.
Save infinite-Joy/c546d45ef64d6f3e450087e037997742 to your computer and use it in GitHub Desktop.
user=> (defn odd-even
#_=> "Determines whether or not n is odd or even."
#_=> [n]
#_=> (cond
#_=> (= (rem n 2) 0) "even"
#_=> (= (rem n 2) 1) "odd"))
#'user/odd-even
user=>
user=> (odd-even 2)
"even"
user=> (odd-even 3)
"odd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment