summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-21 22:59:03 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-21 22:59:03 +0100
commit1881ced59b26819d9e38d7b71af00101a2bcd058 (patch)
treeec9d96a98282e77acc527787be41b6f5b9fafd12
parent10a557db78474e81ba7ad39701a3611c65db0a8a (diff)
Add an example of strictness inheritance.
darcs-hash:c51ca976337e6419c72726c23c5556a230bf2b4d
-rw-r--r--example.lisp8
1 files changed, 8 insertions, 0 deletions
diff --git a/example.lisp b/example.lisp
index a8e0690..d35c314 100644
--- a/example.lisp
+++ b/example.lisp
@@ -64,3 +64,11 @@
(print (subtypep 'b 'printable)) ;=> T
(print (subtypep 'b 'additive)) ;=> T
(print (subtypep 'b 'serialisable)) ;=> NIL
+
+;; Protocols by default inherit their direct ancestors' strictness,
+;; where NIL is recessive, while T is dominant. In any case, a
+;; strictness default can be overridden by providing the :STRICTNESS
+;; option explicitely.
+(print (subtypep 'a 'field)) ;=> T
+(print (subtypep 'a 'serialisable)) ;=> NIL
+(print (subtypep 'a 'serialisable-field)) ;=> NIL