I'd say, same as you would destructure them inline: [& {:keys [k1 k2]}]
--
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
Hi,
Is there some formal syntax used by ^:arglists? I want to express
key-value pairs that are spliced, e.g. (some-fn :k1 value :k2 value)
Thanks,
Georgi
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
I'd like the keys to be optional and destructuring does not support that.
On Mon, Dec 21, 2015, 3:48 PM Herwig Hochleitner
wrote:
> I'd say, same as you would destructure them inline: [& {:keys [k1 k2]}]
>
> --
> You received this message because you are subscribed to
It does. When not passed, a key is nil, or you can provide an or binding:
[& {:keys [k1 k2] :or {k1 :default1 k2 :default2}]
--
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
err​ [& {:keys [k1 k2] :or {k1 :default1 k2 :default2}}]
--
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