I have a quoted expression e.g.
(def foo '(+ 1 (bar)))
I want to be able to find the type of any element of this list, e.g. to do something like
(type (second foo))
I get different results depending on the type of value, for example the following both evaluate to java.lang.Double, which is what I would want
(type '3.0)
(type 3.0)
Yet
(type '+)
(type +)
yields respectively
clojure.lang.Symbol
clojure.core$_PLUS_
I thought perhaps the resolve key would help yet
(type (resolve '+))
evaluates to:
clojure.lang.Var
There are just symbols
'+,'barand self-evaluating object1(long) in your listUse
eval.And
because numbers are self-evaluating objects.