Skip to content

Instantly share code, notes, and snippets.

@rarous
Last active August 29, 2015 14:05
Show Gist options
  • Save rarous/ebd37b5375dc20c6c126 to your computer and use it in GitHub Desktop.
Save rarous/ebd37b5375dc20c6c126 to your computer and use it in GitHub Desktop.
(ns body-mass-index.core)
(defn calc [mass height]
(/ mass (* height height)))
(defn category [bmi]
(cond
(> bmi 30) ::obese
(> bmi 25) ::overweight
(< bmi 18.5) ::underweight
:else ::normal))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment