next up previous
Contents Next: <> , <=, Up: Appendix: Selected Lisp Previous: 1+1- (FUNCTIONS)

= (PREDICATE)

Format: (= <num1> <num2> ...)

Required arguments: 1

<num1> must evaluate to a number

Optional arguments: arbitrary

<num2> ... must all evaluate to numbers

= returns T if all the arguments are numerically equal to each other; it returns NIL otherwise.

Examples:

> (= 2)
T

> (= 2 3)
NIL

> (= 2 3 4)
NIL

> (= 2 2 2 2 )
T

> (= 2 2 3 2)
NIL

> (= 2 'a)
Error: A is not of type NUMBER.



© Colin Allen & Maneesh Dhagat
March 2007