Skip to content
Joshua Mendoza edited this page Jul 6, 2014 · 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