store/[org.clojure/clojure "1.8.0"] clj::clojure.core/parents

Official Documentation

Add notes
Arities
==================================================
   [tag]
   [h tag]

Docstring
==================================================
  Returns the immediate parents of tag, either via a Java type
  inheritance relationship or a relationship established via derive. h
  must be a hierarchy obtained from make-hierarchy, if not supplied
  defaults to the global hierarchy

Source

(defn parents
  "Returns the immediate parents of tag, either via a Java type
  inheritance relationship or a relationship established via derive. h
  must be a hierarchy obtained from make-hierarchy, if not supplied
  defaults to the global hierarchy"
  {:added "1.0"}
  ([tag] (parents global-hierarchy tag))
  ([h tag] (not-empty
            (let [tp (get (:parents h) tag)]
              (if (class? tag)
                (into1 (set (bases tag)) tp)
                tp)))))

Example 1

Edit
;; simple example showing single parented derivation
;; then adding another parent

(derive ::toy_poodle ::poodle)
;; => nil

(parents ::toy_poodle)
;; => #{:user/poodle}

(derive ::toy_poodle ::toy_dogs)
;; => nil

(parents ::toy_poodle)
;; => #{:user/poodle :user/toy_dogs}

Uses on crossclj