store/[org.clojure/clojure "1.8.0"] clj::clojure.core/make-hierarchy

Official Documentation

Add notes
Arities
==================================================
   []

Docstring
==================================================
  Creates a hierarchy object for use with derive, isa? etc.

Source

(defn make-hierarchy
  "Creates a hierarchy object for use with derive, isa? etc."
  {:added "1.0"
   :static true}
  [] {:parents {} :descendants {} :ancestors {}})

Example 1

Edit
;; use make-hierarchy to build your own local hierarchy for derive, isa?, etc. 
;; instead of using the global hierarchy
;; note that the first ancestors call returns a nil since that type does not 
;; exist in the global hierarchy

(def h (make-hierarchy))
;; => #'user/h

(def h (derive h ::rect ::shape))
;; => #'user/h

(def h (derive h ::square ::rect))
;; => #'user/h

;; => h
;; => {:parents {:user/square #{:user/rect}, :user/rect #{:user/shape}},
;;     :ancestors {:user/square #{:user/shape :user/rect}, :user/rect #{:user/shape}},
;;     :descendants {:user/rect #{:user/square}, :user/shape #{:user/square :user/rect}}}

(ancestors ::square)
;; => nil

(ancestors h ::square)
;; => #{:user/shape :user/rect}

Uses on crossclj