Sorry, I wasn't being very clear about my needs.

I need this function to run at *run-time*.

So the following:
(def values [1 2 [3 4 5 6 7 8]])
(def form '(a b (c d & e)))
(destructure form values)

Should return:
{:a 1 :b 2 :c 3 :d 4 :e [5 6 7 8]}

I was wondering whether the "destructure" function can be written
using the existing "let" form. Thanks for your help.
  -Patrick

On Feb 7, 1:50 pm, Fogus <mefo...@gmail.com> wrote:
> I have a library called Evalive (http://github.com/fogus/evalive) that
> could help.  Specifically I added a macro named `destro` that will do
> _mostly_ what you want.  Basically, it looks like the following:
>
> (destro [a b [c d & e]] [1 2 [3 4 5 6 7 8]])
>
> Which returns:
>
> {vec__2183 [1 2 [3 4 5 6 7 8]],
>  a 1,
>  b 2,
>  vec__2184 [3 4 5 6 7 8],
>  c 3,
>  d 4,
>  e (5 6 7 8)}
>
> :f

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