From eea0329f003d1e90a1e76a282edb978186a9ef58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 5 May 2013 16:23:17 +0100 Subject: [PATCH] ETYPECASE --- src/boot.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 () -- 1.7.10.4