underive

added
1.0

ns
clojure.core

type
function

(underive tag parent) (underive h tag parent)

Removes a parent/child relationship between parent and
tag. h must be a hierarchy obtained from make-hierarchy, if not
supplied defaults to, and modifies, the global hierarchy.

                ;; create a simple hierarchy using the global hierarchy
;; and demonstrate how underive is used

user=> (derive ::dog ::animal)
nil
user=> (derive ::spaniel ::dog)
nil
user=> (derive ::tabby ::dog)
nil
user=> (ancestors ::tabby)
#{:user/dog :user/animal}
user=> (underive ::tabby ::dog)
nil
user=> (ancestors ::tabby)
nil