In addition to Benny's suggestion - I will suggest, for future reference, that the ClojureDocs website does an brilliant job in showing some examples. It really is a valuable resource that I've come to rely on.
http://clojuredocs.org/clojure_core/clojure.core/cond And what's interesting to note is the comment made near the bottom: "We should add a comment in the docstring for the final usage of :else." Isn't that a coincidence :) On Jul 6, 6:34 pm, Conrad Taylor <conra...@gmail.com> wrote: > Hi, what's the correct way to define an else clause of a cond form? > For example, > > a) > > (cond > (= total 20) 8.75 > (or (amount > 20) (= country "US") 9.75) > (else 10.0)) > > b) > > (cond > (= total 20) 8.75 > (or (amount > 20) (= country "US") 9.75) > :default 10.0) > > c) > > (cond > (= total 20) 8.75 > (or (amount > 20) (= country "US") 9.75) > 10.0 ) > > d) > > (cond > (= total 20) 8.75 > (or (amount > 20) (= country "US") 9.75) > :else 10.0 ) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en