Coming from a background in Clojure, I am taken with the potential that its pre-/post-conditions provide as a basis for design by contract:
;; sqr.clj
(defn sqr [n]
{:pre [(not= 0 n) (number? n)]
:post [(pos? %) (number? %)]}
(* n n))
(sqr 10)
;=> 100
(sqr 0)
; Assertion error
Is there a similar pre/post capability in Common Lisp and/or a more comprehensive Design by Contract library available in the wild?
Thank you