|
|
|
|
|
by tmtvl
570 days ago
|
|
Common Lisp does assertions right: you can let `assert' provide a restart which allows the user to fix a problem when it crops up. For example: (assert (< index (length some-vector))
(index)
"Can't change the element at index ~D, index must be smaller than ~D."
index
(length some-vector))
That will print a message when the index is too large and give you the option of providing another index. |
|