;;; Suppose we have the syntax (define-recovery (name priority) (problem options) [:precondition condition] body ...) ;;; We could write this to implement "invoke the CONTINUE restart thrice, then notify load balancer and go down": (define-recovery (invoke-continue 1) (problem options) :precondition (<= (length (incidents problem)) 3) (let ((option (find-restart-option 'continue options))) (if (null option) (not-applicable) (invoke-option option)))) (define-recovery (go-down 0) (problem options) (load-balancer:notify-stopping) (stop-job (supervisor problem)))