Tassilo Horn wrote:

> erebus.m...@gmail.com writes:
> 
>> What am I missing here?
> 
> Functions don't really have names.  A function may be bound to a var,
> and that has a name (:name metadata, to be precise).  That said, since
> function's get compiled to classes you could twiddle with the class
> name.
> 
> user> (defn fnname [f]
>         (symbol (clojure.string/replace-first (.getName (class f)) "$"
>         "/")))
> 
> For what do you need that?

I am reading in a csv-file, and then transform the attributes into a hash-
map:

__________________________________________________________________________
name,property1,property2,etc
John,drunk,stinks,etc.
etc.
__________________________________________________________________________

{"John" {:property1 "drunk", :property2 "stinks"} etc

then I create with a function functions like drunk?, so that I can check 
whether John is drunk

(drunk? "John")
true

I need to be able to get all properties in the map but drunk?. Therefore, I 
thought it would be handy to be able to filter out drunk? from the 
functions, but I figured I can only do that if I can treat the function-name 
like a name...

> 
> Bye,
> Tassilo
> 


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to