sign - part-cw/lambdanative GitHub Wiki

(sign x)

sign returns the sign of a number.

Parameter Description
x Number operated on

Example

Example 1: Get the sign of some values.

> (sign 3)
1
> (sign -3)
-1
> (sign 0)
1