parents

added
1.0

ns
clojure.core

type
function

(parents tag) (parents h tag)

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

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

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