(<=) (Less than or equal to operator)

(<= item1 item2 ...)


The first is less than or equal to the others.


This function is the less-than or equal-to operator:

    • If item1 is less than or equal to item2, this function returns a T (true).
    • If item1 is greater than item2, this function returns nil (false).

If this function contains more than two items, the function returns T when each item to the right is less-than or equal to the item on its left. The items can be numbers or strings.

Examples

This expression Returns
(<= 8 12) T
(<= 7 16 16) T
(<= 7) T
(<= "x" "x" "z") T
(<= "x" "y" "x") nil

NOTE  This function is the opposite of the > (Greater Than operator) function.

Tell me about...

(/= item1 item2 ...)

(< item1 item2 ...)

(= item1 item2 ...)

(> item1 item2 ...)

(>= item1 item2 ...)

(cond (statement1 result1 ...) ...)

(if test statement1 [statement2])

(while text statement )

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language