diff options
Diffstat (limited to 'example.lisp')
-rw-r--r-- | example.lisp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/example.lisp b/example.lisp index b1dd46d..a8e0690 100644 --- a/example.lisp +++ b/example.lisp @@ -7,10 +7,12 @@ (define-protocol printable () - ((print-object * stream))) + ((print-object * stream)) + (:strictness t)) (define-protocol serialisable () - ((serialise * stream))) + ((serialise * stream)) + (:strictness t)) (define-protocol additive () ((add * *) @@ -58,3 +60,7 @@ (print (conforms-to-p 'b 'printable)) ;=> T (print (really-conforms-to-p 'b 'printable)) ;=> T + +(print (subtypep 'b 'printable)) ;=> T +(print (subtypep 'b 'additive)) ;=> T +(print (subtypep 'b 'serialisable)) ;=> NIL |