Back
composite-keyword (clj)
(source)variable
(composite-keyword kws)
Return a unique keyword that is derived from an ordered collection of
keywords. The function will return the same keyword for the same collection.
Examples
integrant
(ns integrant.core-test
(:require #?(:clj [clojure.test :refer [are deftest is testing]]
:cljs [cljs.test :refer-macros [are deftest is testing]])
[integrant.core :as ig]
[weavejester.dependency :as dep]))
(deftest composite-keyword-test
(let [k (ig/composite-keyword [::a ::b])]
(is (isa? k ::a))
(is (isa? k ::b))
(is (identical? k (ig/composite-keyword [::a ::b])))
(is (not= k (ig/composite-keyword [::a ::c])))))