Next: , Previous: , Up: Data Types   [Contents][Index]

#### 5.3.5 Comparison Predicates

These functions compare their two arguments in a scalar fashion, the arguments may be of any type but the results are only meaningful for numbers, strings (ASCII values of each byte compared until a non-matching pair is found then those two values are compared as numbers) and cons cells (cars compared before cdrs).

Unlike the `eql` function, inexact and exact numbers will be compared by first coercing the exact number to be inexact.

Function: = arg1 arg2 arg3 … argn

Returns true if all arguments represent the same value.

Function: /= arg1 arg2 arg3 … argn

Returns true if no two arguments represent the same value.

Function: > arg1 arg2 arg3 … argn

Returns true when arg1 is ‘greater than’ arg2, and arg2 is greater than arg3, and so on, upto argn.

Function: >= arg1 arg2 arg3 … argn

Similar to `>`, but for the “greater than or equal to” relation.

Function: < arg1 arg2 arg3 … argn

Similar to `>`, but for the “less than” relation.

Function: <= arg1 arg2 arg3 … argn

Similar to `>`, but for the “less than or equal to” relation.

There are two related functions for finding the maximum or minimum of a sequence of values.

Function: max #!rest args

Return the maximum value from the list of args. When comparing numbers, any inexact arguments cause the result to be inexact.

Function: min #!rest args

Return the minimum value from the list of args. When comparing numbers, any inexact arguments cause the result to be inexact.

Next: , Previous: , Up: Data Types   [Contents][Index]