I have been read the common lisp "Practical Common Lisp" exception handling chapter for days, but I am now so confused with the samples and the explanations, in the meanwhile I tried to write some testing sample, but it didn't work as I expected, below is my testing samples.
Condition definition
(define-condition evenp-error (error) ((text :initarg :text :reader text)))Define function that prints odd number
(defun filter-evenp (lst) (dolist (x lst) (if (not (evenp x)) (print x) (error 'evenp-error :text x))))Restart function
(defun skip-evenp (c) (invoke-start 'skip-evenp))Restart case
(restart-case (filter-evenp (list 1 2 3 4 5)) (skip-evenp () nil))
All I want to do is to print all odd numbers and skip the even errors, what is wrong with my sample? anybody help? many thanks in advance!!