lispdoc - results for signum |
(signum number) | Function: If NUMBER is zero, return NUMBER, else return (/ NUMBER (ABS NUMBER)).
|
Example:(defun final-value (player board) "Is this a win, loss, or draw for player?" (case (signum (count-difference player board)) (-1 losing-value) (0 0) (1 winning-value))) | Mentioned in: CLtL2 - 12.5.2. Trigonometric and Related Functions HyperSpec - Function SIGNUM On Lisp - How Macros Work |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |