(defpackage :fwoar.lisp-sandbox.progress (:use :cl ) (:export )) (in-package :fwoar.lisp-sandbox.progress) (define-condition progress () ((%progress :reader progress :initarg :progress))) (defun do-something () (loop for x to 100 by 10 do (signal 'progress :progress x) (sleep 1))) (defun main () (handler-bind ((progress (lambda (it) (format t "Got progress: ~d~%" (progress it))))) (do-something)))