If you destructure the parameters like this:
(defn f [& {:as a-map}] ...)

You can use map primitives on a-map.  But you can also supply defaults here.
 On Jun 20, 2014 2:14 PM, "Dave Tenny" <dave.te...@gmail.com> wrote:

> What is the commonly accepted technique for declaring/using 'supplied-p'
> type lambda list functionality in clojure?
>
>
> http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-4-1.html
>
>
> I have some clojure functions with a large number of keywords and various
> defaults, I want to know if a keyword was specified by the caller (rather
> than defaulted) in some cases.
>
> Certainly I could implement my own destructuring macros that did this, but
> I'd like to avoid reinventing a wheel here if I can, and also to know the
> idiomatic clojure way to do it.
>
> Thanks for any tips.
>
>
>  --
> 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
> ---
> 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 clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to