var, value and symbol: when to pass as an argument?

7 views
Skip to first unread message

lawrenc...@gmail.com

unread,
Dec 18, 2013, 11:31:11 AM12/18/13
to clojure...@googlegroups.com
Let's say I do this as the REPL:

user> (def empty-vector [])
#'user/empty-vector

user> (type empty-vector)
clojure.lang.PersistentVector

user> (type 'empty-vector)
clojure.lang.Symbol

user> (type #'empty-vector)
clojure.lang.Var

So I can see the differences. However, I remain confused about when to use Symbol and when to use Var. If I write a function which takes a function as an argument, do I pass that 2nd argument a symbol, var, or unadorned? 


lawrenc...@gmail.com

unread,
Dec 18, 2013, 11:31:42 AM12/18/13
to clojure...@googlegroups.com
Sorry, I posted this to the wrong mailist. 
Reply all
Reply to author
Forward
0 new messages