Skip to content
fogus edited this page Mar 11, 2013 · 3 revisions

with-constraints

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:

(def constrained-sqr
  (with-constraints
    sqr
    sqr-contract))
See the docs of [contract] for more detail. [return to documentation]
Clone this wiki locally