By string I mean human readable...
On Wed, 13 Jul 2011 21:56:58 -0400
Luc Prefontaine <[email protected]> wrote:
> #<core$get clojure.core$get@77036a6b> is a string representation of
> the fn object, not the object itself.
>
> user=> (def a get)
> #'user/a
> user=> (meta a)
> {:ns #<Namespace clojure.core>, :name get, :file
> "clojure/core.clj", :line 1154, :arglists ([map key] [map key
> not-found]), :added "1.0", :inline-arities #{2 3}, :inline
> #<core$get__inliner clojure.core$get__inliner@3a1834>, :doc "Returns
> the value mapped to key, not-found or nil if key not present."}
>
> works because a contains the fn object (get in this case).
>
> If your intent is to get the meta data of an unnamed fn at runtime
> the above solves your issue.
>
> Luc P.
>
> On Wed, 13 Jul 2011 18:35:00 -0700 (PDT)
> Tim Robinson <[email protected]> wrote:
>
> > I know I can get the meta data using the following form:
> >
> > => (meta #'get)
> > {:ns #<Namespace clojure.core>, :name get, :file "clojure/
> > core.clj"....
> >
> > Is there a means to get the meta data from the stored function
> > without using its identifier?
> >
> > ie. knowing this result:
> >
> > => get
> > #<core$get clojure.core$get@77036a6b>
> >
> > Can I somehow do this:
> >
> > =>(meta #<core$get clojure.core$get@77036a6b>)
> > java.lang.Exception: Unreadable form...
> >
> > Thanks,
> > Tim
> >
>
>
>
--
Luc P.
================
The rabid Muppet
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en