Re: alternative to passing parameters to functions

2013-02-19 Thread Pablo Nussembaum
You can also check prismatic plumbing library where they a new function definition type based on maps. link: https://github.com/Prismatic/plumbing/tree/master/src/plumbing/fnk On 02/18/2013 05:33 AM, Gunnar Völkel wrote: > You can checkout clojure.options > (https://github.com/guv/clojure.options

Re: alternative to passing parameters to functions

2013-02-18 Thread AtKaaZ
Thanks guys, I think I will go with this variant that vemv suggested and upon further exploring I realized it can do much more (still exploring currently): *(defn somefn [req1 req2 **;required params * *& {:keys [a b c d e]** ;optional params* *:or {a 1** ;optional params with preset de

Re: alternative to passing parameters to functions

2013-02-18 Thread Gunnar Völkel
You can checkout clojure.options (https://github.com/guv/clojure.options/). One of its main features is documentation for options (even transitive ones in calls to other functions with options). -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: alternative to passing parameters to functions

2013-02-17 Thread vemv
fn's "keyword arguments" feature provide unrolled, optional key-value args: (defn foo [& {:keys [a b c]}] [a b c]) (foo :c 4) ;; [nil nil 4] On Sunday, February 17, 2013 10:06:13 PM UTC+1, AtKaaZ wrote: > > Was there a library or some other way to pass ie. maps to functions > so that the order