The nested `:keys` form for `b1`/`b2` must be moved out from the
vector containing `a`...
(defn foo [{:keys [a] {:keys [b1 b2] :as b} :b}] [a b1 b2 b])
(foo {:a 1 :b {:b1 2 :b2 3}})
; => [1 2 3 {:b2 3, :b1 2}]
Hth!
On 22 November 2013 19:06, David James <[email protected]> wrote:
> I made a quick destructuring code walkthrough at
> https://github.com/xpe/clj-destruct/blob/master/src/destruct/core.clj
>
> I was hoping to show how to nest :keys inside of :keys but failed. Did I
> overlook something?
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
--
Karsten Schmidt
http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.