#| ;; $Id: examples.lisp,v 1.1 2003/10/21 17:30:56 nhabedi Exp $ ;; EXAMPLES.LISP ;; Nick Levine, Ravenbrook Limited, 2003-08-14 ;; ;; These are the examples I expect to use in the tutorial on CLOS ;; at the International Lisp Conference 2003. ;; ;; This document is mainly for my operational convenience. You might ;; want to raid fragments to help you get started when building CLOS ;; into your Common Lisp applications. Nothing useful will happen if ;; you try to cl:load this document into a lisp image. ;; ;; This document is provided "as is", without any express or implied ;; warranty. In no event will the author be held liable for any ;; damages arising from the use of this document. You may make and ;; distribute verbatim copies of this document provided that you do ;; not charge a fee for this document or for its distribution. |# '(provide "sanity-util") ;; Test macro (defmacro is (eqf expected actual) (let ((a (gensym "a")) (b (gensym "b"))) `(let ((,a ,expected) (,b ,actual)) (if (,eqf ,a ,b) (format t "OK: ~a is ~a to ~a~%" ',expected ',eqf ',actual) (progn (format t "FAILED: when matching ~a and ~a~%" ,a ,b) #+WAM-CL (prolog-inline "trace") #+CLISP (BREAK) #+CLISP (quit 1)) ))))