lispdoc - results for decf |
(decf place &optional (delta 1) &environment env) | Function: The first argument is some location holding a number. This number is decremented by the second argument, DELTA, which defaults to 1.
|
Example:(defun account-withdraw (account amt) "Make a withdrawal from this account." (if (<= amt (account-balance account)) (decf (account-balance account) amt) 'insufficient-funds)) | Mentioned in: CLtL2 - 12.4. Arithmetic Operations CLtL2 - 7.11. Dynamic Non-Local Exits CLtL2 - 7.2. Generalized Variables HyperSpec - Macro INCF, DECF On Lisp - CLOS and Lisp PCL - basic math PCL - defmethod PCL - good object oriented design PCL - other ways to modify places |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |