Permalink
Browse files

Added simplest example

  • Loading branch information...
1 parent 111000c commit 6c0a50554483750fc899475eb270f3c44afccaa9 @fogus fogus committed Jan 22, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 examples/simple.clj
View
@@ -0,0 +1,12 @@
+
+(defn sqr [n] (* n n))
+
+(sqr 10)
+;=> 100
+
+(sqr 0)
+;=> 0
+
+(contracts/provide
+ (sqr "Constraints for squaring"
+ [x] [number? (not= 0 x) => number? pos?]))

0 comments on commit 6c0a505

Please sign in to comment.