Re: I tripped out

2013-05-07 Thread Gunnar Völkel
You might be interested in https://github.com/guv/clojure.options/ -- -- 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 wit

Re: I tripped out

2013-05-07 Thread AtKaaZ
yes, thank you, that is what I was referring to + the :or and :as like: (defn somefn [req1 req2 ;required params & { :keys [a b c d e] ;optional params :or {a 1 ;optional params with preset default values other than the nil default ; b takes nil if not specified on c

Re: I tripped out

2013-05-06 Thread Pierre-Yves Ritschard
atkaaz, you can do this: (fn [& {:keys [arg1 arg2 arg3]}] ...) On Mon, May 6, 2013 at 10:03 PM, AtKaaZ wrote: > I agree, I'm not sure what he means xD > If you ask me, I'd rather have each arg be identified by a keyword instead > of by order > like: (somefn :arg1 "somestr" :arg3 100 :arg2 (+ 1

Re: I tripped out

2013-05-06 Thread AtKaaZ
I agree, I'm not sure what he means xD If you ask me, I'd rather have each arg be identified by a keyword instead of by order like: (somefn :arg1 "somestr" :arg3 100 :arg2 (+ 1 2)) or all those in a map I'll probably still do that for me, so that any function will take params like this. There's pro

Re: I tripped out

2013-05-05 Thread Alex Fowler
Tell us more about it. On Sunday, May 5, 2013 11:54:32 AM UTC+4, JvJ wrote: > > Is anyone else tripped out when they realize that when you write args for > a function you're basically just destructuring an arg vector? It trips > me out. -- -- You received this message because you are sub

Re: I tripped out

2013-05-05 Thread James MacAulay
Yeah. It seems like the logical extension of this would be to allow (fn args expr) to be equivalent to (fn [& args] expr)...but I'm not sure how useful that would actually be. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: I tripped out

2013-05-05 Thread Gary Trakhman
We write all these s-exps, but in the end it's just convenient ways to control electricity, and we are Magneto. On Sunday, May 5, 2013, JvJ wrote: > Is anyone else tripped out when they realize that when you write args for > a function you're basically just destructuring an arg vector? It tr