Back

collection-tag (clj)

(source)

function

(collection-tag x)

Examples

clojure/core.typed
(deftest atom?-test
  (is-tc-e #(atom? "abc") [-> Boolean]
           :requires [[clojure.inspector :refer [atom?]]])
  (is-tc-err #(atom? "abc") [-> String]
             :requires [[clojure.inspector :refer [atom?]]]))

(deftest collection-tag-test
  (is-tc-e #(collection-tag "abc") [-> Keyword]
           :requires [[clojure.inspector :refer [collection-tag]]])
  (is-tc-err #(collection-tag "abc") [-> String]
             :requires [[clojure.inspector :refer [collection-tag]]]))
typedclojure/typedclojure
(deftest atom?-test
  (is-tc-e #(atom? "abc") [-> Boolean]
           :requires [[clojure.inspector :refer [atom?]]])
  (is-tc-err #(atom? "abc") [-> String]
             :requires [[clojure.inspector :refer [atom?]]]))

(deftest collection-tag-test
  (is-tc-e #(collection-tag "abc") [-> t/Keyword]
           :requires [[clojure.inspector :refer [collection-tag]]])
  (is-tc-err #(collection-tag "abc") [-> String]
             :requires [[clojure.inspector :refer [collection-tag]]]))