From: David Vázquez Date: Sun, 5 May 2013 15:23:17 +0000 (+0100) Subject: ETYPECASE X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=eea0329f003d1e90a1e76a282edb978186a9ef58;p=jscl.git ETYPECASE --- diff --git a/src/boot.lisp b/src/boot.lisp index ab043a9..ceaf956 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -583,10 +583,15 @@ (list nil))))) clausules))))) +(defmacro etypecase (x &rest clausules) + (let ((g!x (gensym))) + `(typecase ,g!x + ,@clausules + (t (error "~X fell through etypeacase expression." ,g!x))))) + (defun notany (fn seq) (not (some fn seq))) - (defconstant internal-time-units-per-second 1000) (defun get-internal-real-time ()