Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added readme

  • Loading branch information...
commit 5de10245317b256b196e4d4102c4fd742f983c44 1 parent 39806b3
@dnaumov authored
Showing with 49 additions and 15 deletions.
  1. +0 −13 README
  2. +47 −0 README.md
  3. +2 −2 project.clj
View
13 README
@@ -1,13 +0,0 @@
-# contracts
-
-FIXME: write description
-
-## Usage
-
-FIXME: write
-
-## License
-
-Copyright (C) 2012 FIXME
-
-Distributed under the Eclipse Public License, the same as Clojure.
View
47 README.md
@@ -0,0 +1,47 @@
+# Clojure-contracts
+
+[Clojure-contracts](https://github.com/dnaumov/clojure-contracts) is a
+library for
+[contract programming](http://en.wikipedia.org/wiki/Design_by_contract)
+in [Clojure](http://clojure.org).
+
+**WARNING: this is a work in progress. It's not feature complete and
+ may contain bugs.**
+
+
+## Usage
+
+See the **[tutorial](http://ubuntuone.com/0XjGCvBQviMz2qpaUUe5jW)**.
+
+A quick example:
+
+```
+user> (defn foo [x] (+ x 5))
+
+user> (foo nil) ;=>
+ No message.
+ [Thrown class java.lang.NullPointerException]
+
+user> (provide-contract foo (c/=> number? number?))
+
+user> (foo nil) ;=>
+ Precondition failed for var #'user/foo
+ Expecting: number?
+ Given: nil
+```
+
+See the [tutorial](http://ubuntuone.com/0XjGCvBQviMz2qpaUUe5jW)
+for details.
+
+
+## Installation
+
+Add `[clojure-contracts "0.0.1-SNAPSHOT"]` to your project's
+dependecies. [Clojars page](http://clojars.org/clojure-contracts).
+
+
+## License
+
+Copyright (C) 2012 [Dmitri Naumov](https://github.com/dnaumov)
+
+Distributed under the Eclipse Public License, the same as Clojure.
View
4 project.clj
@@ -1,5 +1,5 @@
-(defproject contracts "1.0.0-SNAPSHOT"
- :description "FIXME: write description"
+(defproject clojure-contracts "0.0.1-SNAPSHOT"
+ :description "Contract programming for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/core.match "0.2.0-alpha9"]]
:dev-dependencies [[midje "1.3.2-SNAPSHOT"]
Please sign in to comment.
Something went wrong with that request. Please try again.