Back
derived-from? (clj)
(source)function
(derived-from? key candidate)
Return true if a key is derived from candidate keyword or vector of
keywords.
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 derived-from?-test
(are [a b] (ig/derived-from? a b)
::p ::p
::p ::pp
::p ::ppp
::ap [::a ::p]
::ap [::a ::pp]
[::a ::p] [::a ::pp]
[::a ::b ::p] [::a ::ppp]))