Is there a more concise way of expressing an optional parameter with a
default other than writing another entire definition?
That is, instead of:
(defn a-function ; two parameters, x and y, and y is 23 by default
([x] (a-function x 23)
([x y] ...))
...is it possible to do something like:
(defn a-function [x [y :default 3]
...)
I'm fine with the first way, but I'm just wondering if there's another
way.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---