Re: Get the name of parameters in a function

2016-06-06 Thread Steven Zhou
Thanks a ton, that's why I like the Clojure community so much! On Saturday, June 4, 2016 at 1:23:13 AM UTC-4, Atamert Ölçgen wrote: > > > > On Sat, Jun 4, 2016 at 1:45 AM, James Reeves > wrote: > >> You can do it with a macro. >> >> - James >> >> On 3 June 2016 at 22:22, Steven Zhou > >> wrote:

Re: Get the name of parameters in a function

2016-06-03 Thread Atamert Ölçgen
On Sat, Jun 4, 2016 at 1:45 AM, James Reeves wrote: > You can do it with a macro. > > - James > > On 3 June 2016 at 22:22, Steven Zhou wrote: > >> Is it possible to write down a function do the following? >> >> (defn foo >> [input] >> >> ) >> >> (def x "Hello") >> (def y "Clojure")

Re: Get the name of parameters in a function

2016-06-03 Thread James Reeves
You can do it with a macro. - James On 3 June 2016 at 22:22, Steven Zhou wrote: > Is it possible to write down a function do the following? > > (defn foo > [input] > > ) > > (def x "Hello") > (def y "Clojure") > > (foo [x y]) > => {:x "Hello" :y "Clojure"} > > > Regards, > -Steven