Laurent and Robert,
Thank you all.
On Thu, Dec 16, 2010 at 9:44 AM, Laurent PETIT wrote:
> Indeed !
>
> I was stuck in the macro thinking, thanks for getting us out of it !
>
> And then this solution not only works for literal strings:
>
> user=> (foo (str "yo" "man"))
> #'user/yoman
> user=> y
Indeed !
I was stuck in the macro thinking, thanks for getting us out of it !
And then this solution not only works for literal strings:
user=> (foo (str "yo" "man"))
#'user/yoman
user=> yoman
"yoman"
user=>
2010/12/16 Robert McIntyre
> no need to use macros at all:
>
> (defn foo
> "creates
no need to use macros at all:
(defn foo
"creates a symbol named s with the value s in the current namespace "
[s]
(intern *ns* (symbol s) s))
that is, assuming I got the use case right.
--Robert McIntyre
On Wed, Dec 15, 2010 at 8:00 AM, Laurent PETIT wrote:
> 2010/12/15 Emeka
>>
>> Helllo
2010/12/15 Emeka
> *Helllo All,*
> *
> *
> *Is there a better way of doing this?*
> *
> *
> *(defmacro foo [string] (let[b# string f# (symbol b#)] `(def ~f# ~b#)))*
>
Hello,
What is it supposed to be used ?
What do you expect the macroexpansion to look like ?
As is stands, your example can g