Permalink
Browse files

A place to mull over ideas

  • Loading branch information...
1 parent 43bc610 commit e622b8210debeb7d78a9a022cb11bf328bed28f1 @fogus committed Jul 23, 2010
Showing with 28 additions and 0 deletions.
  1. +28 −0 thoughts.md
View
@@ -0,0 +1,28 @@
+ (defcontracts
+ [sqr [n] number? (not= 0) => pos? number?]
+
+ [doubler
+ [x] number? => number? (= n (* 2 x))
+ [x y] (every? number? [x y]) => number? (= n (* 2 (+ y x)))])
+
+**and**
+
+ (cnstrfn
+ "This function squares a number"
+ [n]
+ [number? (not= 0) => pos? number?]
+ (* n n))
+
+**and**
+
+ (defcnstrfn sqr
+ "This function squares a number"
+ [n]
+ [number? (not= 0) => pos? number?]
+ (* n n))
+
+**and**
+
+ (contract
+ "A contract for squaring"
+ [n] number? (not= 0) => pos? number?)

0 comments on commit e622b82

Please sign in to comment.