Trammel

a contracts-programming library for Clojure

Contracts Programming

the relationship between a class and its clients as a formal agreement, expressing each party's rights and obligations

read more

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:

(def constrained-sqr
  (with-constraints
    sqr
    sqr-contract))

See the docs of contract for more detail.

return to documentation

clojars → source code → tickets → wiki →