We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 221d966 commit 795f08eCopy full SHA for 795f08e
src/cljs/cljs/core.cljs
@@ -908,6 +908,11 @@
908
(-invoke [_ a b c d e f g h i j k l m n o p q r s t rest]
909
(apply (val) a b c d e f g h i j k l m n o p q r s t rest)))
910
911
+(defn var?
912
+ "Returns true if v is of type cljs.core.Var"
913
+ [v]
914
+ (instance? cljs.core.Var v))
915
+
916
;;;;;;;;;;;;;;;;;;; fundamentals ;;;;;;;;;;;;;;;
917
918
(declare array-seq prim-seq IndexedSeq)
test/cljs/cljs/core_test.cljs
@@ -2736,6 +2736,10 @@
2736
:foo #'foo-1187
2737
:bar #'bar-1187) []))
2738
2739
+(deftest test-var?
2740
+ (is (var? #'inc))
2741
+ (is (not (var? 1))))
2742
2743
(deftest test-cljs-1187
2744
(testing "Internal var nodes analyzed in expression context"
2745
(is (= (with-out-str (print-foo-1187 :foo))
0 commit comments