about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDarren Bane <dbane@tilde.institute>2020-06-07 00:09:49 +0100
committerDarren Bane <dbane@tilde.institute>2020-06-07 00:09:49 +0100
commit8d5a6ff925ff91cced886654ab271f2243f29caf (patch)
tree9a2bd40deaf49f5756b72b8acc90d4f96c8e8269
parentf0467d992324a56ee5fdf8c94ee2608db0a61ac3 (diff)
downloadlsp-8d5a6ff925ff91cced886654ab271f2243f29caf.tar.gz
Making changes
-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.