Hi all,
I was just wondering whether there is any particular preference between
storing fns in maps via #' or simply the name of the var?
example:
(defn foo [a b] ...)
(defn bar [c d] ...)
(def actions {:act-foo foo ;;1st
:act-bar #'bar}) ;;2nd
I understand that the first one will essentially store a pointer to the
actual function held by the 'foo' var, while the second one will store a
pointer to the actual var which sounds slightly more flexible to me (the
var can be potentially rebound to something else which may or may not be
useful)...
Is there a preferred way between the 2? not that I'm facing any
functionality problems with either - just curiosity...
Jim
--
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