predecessor [Relation]


Purpose

The predecessor relation returns the element which precedes a specified member of an ordered set.

Syntax

predecessor set member1 member2

Domains

The set argument is a concept defined as an ordered set.

The member1 argument is a numeric or symbolic member of set.

Range

The member2 argument is the numeric or symbolic member which immediately precedes member1 in set.

Examples

(defset Level :is (:the-ordered-set 'LOW 'MEDIUM 'HIGH)) 
(ask (predecessor Level 'HIGH 'MEDIUM)) ==> T 
(retrieve ?x (predecessor Level 'MEDIUM ?x)) ==> (LOW)

See Also

Last modified: Jun 1 1995