forked from clojure/clojure
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
:pre and :post conditions as metadata on arglist, or map following ar…
…glist 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
- Loading branch information
1 parent
ff26acc
commit 0ac4828
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters