diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-24 16:54:51 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-24 16:54:51 +0200 |
commit | b67cbad14d925e35870f5aae8f42efac2ad1733f (patch) | |
tree | 40332f5f32ca31339e730c216083c33a8583c2aa | |
parent | 28f59fbe2973dbf81f1cfda7127b9a0357878e63 (diff) |
Clarify the examples a bit.
darcs-hash:24c2f99aa290e55fe04c60582f2b33526c690cf6
-rw-r--r-- | example.lisp | 16 |
1 files 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 |