operator: inherit
description:
inherit[op] ket
inherit operator from parent data-types
examples:
-- learn a little about our old cat Trudy:
-- and the inheritance structure:
inherit |trudy> => |cat>
inherit |cat> => |feline>
inherit |feline> => |mammal>
inherit |mammal> => |animal>
has-fur |animal> => |yes>
has-teeth |animal> => |yes>
has-pointy-ears |feline> => |yes>
-- Trudy has no teeth, which over-rides the animal has-teeth rule:
has-teeth |trudy> => |no>
-- now ask some questions:
inherit[has-pointy-ears] |trudy>
|yes>
inherit[has-fur] |trudy>
|yes>
inherit[has-teeth] |trudy>
|no>
see also:
clone
Home