Reputation: 14258
In clojure, (var some-function)
and #'some-function
are equivalent.
What is the clojurescript equivalent of var
?
Upvotes: 1
Views: 146
Reputation: 3527
ClojureScript also has var
as a special form. And, in ClojureScript (var foo)
and #'foo
are equivalent.
Having said that, ClojureScript's var
is a bit limited compared to Clojure:
Vars are not reified at runtime. When the compiler encounters the
var
special form it emits aVar
instance reflecting compile time metadata. (This satisfies many common static use cases.)
(Taken from Differences from Clojure.)
Upvotes: 3