From b67cbad14d925e35870f5aae8f42efac2ad1733f Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Mon, 24 Sep 2007 16:54:51 +0200 Subject: Clarify the examples a bit. darcs-hash:24c2f99aa290e55fe04c60582f2b33526c690cf6 --- example.lisp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/example.lisp b/example.lisp index 39f33b4..b1dd46d 100644 --- a/example.lisp +++ b/example.lisp @@ -46,15 +46,15 @@ (defmethod negate ((x b))) (defmethod multiply ((x b) y))) -(print (conforms-to-p 'b 'additive)) -(print (really-conforms-to-p 'b 'additive)) -(print (conforms-to-p 'b 'multiplicative)) -(print (really-conforms-to-p 'b 'multiplicative)) -(print (conforms-to-p 'b 'printable)) -(print (really-conforms-to-p 'b 'printable)) +(print (conforms-to-p 'b 'additive)) ;=> T +(print (really-conforms-to-p 'b 'additive)) ;=> T +(print (conforms-to-p 'b 'multiplicative)) ;=> T +(print (really-conforms-to-p 'b 'multiplicative)) ;=> NIL +(print (conforms-to-p 'b 'printable)) ;=> NIL +(print (really-conforms-to-p 'b 'printable)) ;=> NIL ;; The following works because PRINT-OBJECT is specialised over T. (implement-protocols b (printable)) -(print (conforms-to-p 'b 'printable)) -(print (really-conforms-to-p 'b 'printable)) +(print (conforms-to-p 'b 'printable)) ;=> T +(print (really-conforms-to-p 'b 'printable)) ;=> T -- cgit v1.2.3