Clojure’s <= predicate checks whether arguments are monotonically increasing from left to right, allowing adjacent values to be equal. It returns a Boolean. section 6.3
Use these arities and contracts:
- With one argument, <= returns true for any type. section 6.3
- With two or more arguments, every argument must be numeric; integers, decimals, ratios, big numbers, and other Java numeric types are accepted. section 6.3
- With multiple arguments, each value must be less than or equal to the next; one failed comparison makes the result false. section 6.3
- Calling it with no arguments raises ArityException; a nonnumeric argument in a multiargument call raises ClassCastException. section 6.3
Chained ordering
Write (<= x y z) to verify x <= y and y <= z together. The variadic form follows the same comparison-operator shape as (<), (>), and (>=). section 6.3
