diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-06-24 15:21:42 -0400 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-06-24 15:21:42 -0400 |
commit | 0ac482878a1dd520cbee2faa0f5f6ab1082ffa76 (patch) | |
tree | cb40da655cf0696397c4c0d142f41da9a4cedf45 /src/lisp/clojure.lisp | |
parent | ff26acc38d33b1cf17adce156a458b7df6588a3e (diff) |
:pre and :post conditions as metadata on arglist, or map following arglist
conditions are predicate exprs in a vector
return value of fn is bound to % for :post
(defn foo [x y]
{:pre [(even? x) (< x y)]
:post [(> % 3)]}
(* x y))
add *assert*, default true, when not true asserts are no-ops
*assert* is bound in repl
Diffstat (limited to 'src/lisp/clojure.lisp')
0 files changed, 0 insertions, 0 deletions