Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Adding with-constraints from old trammel version

  • Loading branch information...
commit fae4025a43ba1a35c1866ed426b478b042ac21d8 1 parent 1ada1da
@fogus fogus authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 docs/
19 docs/
@@ -0,0 +1,19 @@
+title: Trammel - Applying Contracts Manually
+Trammel'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>
+See the docs of [`contract`](../contract/) for more detail.
+[return to documentation](../docs.html)
Please sign in to comment.
Something went wrong with that request. Please try again.