next up previous
Contents Next: member (FUNCTION) Up: Appendix: Selected LISP Previous: mapcar (FUNCTION)

max, min (FUNCTIONS)

Format: (max <num1> ... <numN>) (min <num1> ... <numN>)

Required arguments: 1

<num1> ... <numN> must all evaluate to numbers

Returns the numerical maximum (minimum) of the arguments given.

Examples:

>(max 1 4 3 15 (* 9 2))
18

>(min 3 4 (- 7 19) 5 6.0)
-12

>(max 3)
3

>(min 4)
4



© Colin Allen & Maneesh Dhagat
November 1999