I have some code that reads data from a config file. If there’s a problem loading, I’d like the opportunity to fix it, outside of Lisp, and retry loading. It’s easy to do that with with-simple-restart and loop:
(loop (with-simple-restart (try-again "Try again") (return (progn (setf *config* (load-config-file))))
If any error occurs during load-config-file, I can either fix up the file and choose the try-again restart, or give up and use an abort restart.
(Thanks to Frode Vatvedt Fjeld for the concise idiom.)