CL Unification: Class NUMBER-TEMPLATE
 

Class NUMBER-TEMPLATE

Package:

COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.UNIFICATION

Class Precedence List:

NUMBER-TEMPLATE, TYPE-TEMPLATE, TEMPLATE, STANDARD-OBJECT, T.

Known Subclasses:

None.

Slots:

None.

Description:

The NUMBER-TEMPLATE class denotes those object that are used to unify against a NUMBER.

Template Syntax:

  #T42
  

  #T(number 42)
  

  #T(number ?num)
  

  #T#C(1.2 3.4)
  

The NUMBER-TEMPLATE syntax denotes a NUMBER. NUMBER-TEMPLATEs can only unified against a NUMBER.

Examples:

  cl-prompt> (setf e (unify 42 #T42))
  #<ENVIRONMENT xxx>
  
  cl-prompt> (setq e (unify 42 #T()))
  --> Error: UNIFICATION-FAILURE

  cl-prompt> (setf e (unify 42 #T(number ?num)))
  #<ENVIRONMENT xxx>

  cl-prompt> (find-variable-value '?num e)
  42
  T
  

Affected By:

None.

Exceptional Situations:

Unifying an NUMBER-TEMPLATE against a non-NUMBER object results in an UNIFICATION-FAILURE error being signaled.

See Also:

UNIFY

Notes:

There is no COMPLEX-NUMBER-TEMPLATE class, although a case for it can be easily made.

 

News

News in chronological order, most recent on top.

  • 2004-10-30
    Completed description.