about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dbc.lsp4
-rw-r--r--doc/breaking_rules.md5
2 files changed, 8 insertions, 1 deletions
diff --git a/dbc.lsp b/dbc.lsp
index 3429896..48f1d6f 100644
--- a/dbc.lsp
+++ b/dbc.lsp
@@ -3,8 +3,10 @@
 ;; (set-dynamic *use-contract* nil)
 (defcontract average-of-absolutes (values)
    (:in ()
-	(> (length values) 0))
+	(assure <list> values)
+	(> (length values) 0))		; Redundant?
    (:out (res)
+	 (assure <integer> res)
 	 (>= res 0))
    (quotient (reduce #'+ (map '<list> #'abs values)) (length values)))
 ;; (average-of-absolutes '(1 3))
diff --git a/doc/breaking_rules.md b/doc/breaking_rules.md
index 7933efb..5061df7 100644
--- a/doc/breaking_rules.md
+++ b/doc/breaking_rules.md
@@ -38,6 +38,11 @@ pitman 1994
 \.]
 .
 
+*NB*: I am almost certainly re-inventing a SmallTalk wheel.  However I
+argue that Lisp's combination of imperative & OO has been validated by
+industry whereas pure OO as in SmallTalk (or logic programming as in
+Prolog) is still niche.
+
 A closely related are is that of "specification animation",
 quickly writing an implementation of some subset of a formal specification in
 for example Z or VDM.