> > TL;DR: I want to know best practices for designing functions with multiple > optional arguments. >
Use destructing: (defn f [required & {:keys [foo bar] :or {foo :default}}] [required foo bar]) (f 3 :bar 1 :foo 2) ;=> [3 2 1] (f 3 :bar 1) ;=> [3 :default 1] -- 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