On 2010 Mar 23, at 10:56 PM, Per Vognsen wrote:
:keys elements optionally be two-element vectors with the second
element supplying the default value:

user=> (defn funkymonkey [x y z & {:keys [[a -1] [b -2] [c -3]]] [x y z a b c])

What do you think? I hacked this into my local version of core.clj's
destructure and it feels very natural to me.

I like the existing arity overloading, and when I looked into the core source, was saddened to see the repeated code that handled optional parameters. This is one thing I like from Common Lisp, so I'm glad to see it here. However, as a clojure newbie, I have no idea what subtle interactions this might have.

-Doug

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

To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or 
reply to this email with the words "REMOVE ME" as the subject.

Reply via email to