Yes. The trick is that
(keyword 'x/y)
is different from
(ns x)
::y

On Aug 24, 7:07 pm, Konrad Hinsen <konrad.hin...@fastmail.net> wrote:
> On 24 Aug 2009, at 18:31, Dragan Djuric wrote:
>
> > I needed (and created) a macro to generate keywords from symbols. I
> > couldn't find anything ready, and I am still not completely
> > comfortable with the solution I came up with. Any suggestions for
> > improvement?
>
> What are your exact requirements? Here's the most straightforward  
> solution:
>
> (keyword 'abc)
> :abc
>
> (keyword 'x/y)
> :x/y
>
> But apparently you want to convert a non-qualified symbol to a  
> namespace-qualified keyword. Is that right?
>
> Konrad.
--~--~---------~--~----~------------~-------~--~----~
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to