(defn get-latitude [] 42)
(def latitude (get-latitude))
;; the very same chain written with plain ifs: the else branch of one if
;; holds the next if. It works, and it is exactly why cond exists —
;; every extra branch costs one more level of nesting
(def location
(if (= latitude 0)
"Equator"
(if (= latitude 90)
"north Pole"
(if (= latitude -90)
"south Pole"
"not at the Equator or Pole"))))
;; location is "not at the Equator or Pole"
(println "latitude" latitude "is" location)