Browse files

Tweak of with-cnstr

  • Loading branch information...
1 parent 3be526a commit 0f55199d1f7ff09f8a1665e08bab618f7d501bce @fogus fogus committed Jul 24, 2013
Showing with 6 additions and 9 deletions.
  1. +6 −9 docs/
@@ -2,15 +2,12 @@
core.contracts's ~with-constraints~ macro takes a function followed by one or more contracts and returns a new function that is the amalgamation of them all:
-<div class="gist">
- <div class="gist-file">
- <div class="gist-data gist-syntax">
- <div class="gist-highlight">
-<pre><div class="line" id="LC1"><span class="p">(</span><span class="k">def </span><span class="nv">constrained-sqr</span> </div><div class="line" id="LC2">&nbsp;&nbsp;<span class="p">(</span><span class="nf">with-constraints</span></div><div class="line" id="LC3">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">sqr</span></div><div class="line" id="LC4">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">sqr-contract</span><span class="p">))</span></div></pre>
- </div>
- </div>
- </div>
+#+begin_src clojure
+(def constrained-sqr
+ (with-constraints
+ sqr
+ sqr-contract))
See the docs of [[./contract/][contract]] for more detail.

0 comments on commit 0f55199

Please sign in to comment.