> My question is: I would like to allow the first parameter to be an
> (optional) map containing key values for the function.  What's a clean,
> readable way to do that?

How about this:

(defn example [& args]
  (let [opts (when map? (first args))
        args (when opts (next args))]
       (reduce str args)))


Timothy

-- 
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

Reply via email to