I'd like to do this:

   (defn ^{:a 1} f []  5)    ;; notice the metadata  {:a 1}

But it doesn't work:

   (meta f)     ;; =>  nil

But I can do this:
    (def ff (with-meta f {:b 1}))

and it works:
     (meta ff)     ;; => {:b 1}

So, if I want to attach recoverable metadata, I must do it in two steps. 

I could create a macro to help out.  No wait.  Isn't defn a macro?  :-)

What am I missing here - why isn't defn metadata recoverable in clojurescript?

--
Mike

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to