                                forms))]
     (list* 'fn name body)))
 
+(defn build-forms-map
+  [forms]
+  (for [[[e] & c] (map #(partition-by keyword? %) data)]
+    {e (apply hash-map c)}))
+
+(comment
+  {:cnstr ({[x] {(:requires)
+                 ((number? x) (pos? x)),
+                 (:body) ((float x)),
+                 (:ensures) ((float? %))}}
+           
+           {[x y] {(:requires) ((every? number? [x y]) (every? pos? [x y])),
+                   (:body) ([(float x) (float y)]),
+                   (:ensures) ((every? float? %))}}), :doc "test", :name foo})
+
 (defmacro defconstrainedfn
   [name & body]
   (let [mdata (if (string? (first body))

        body  (if (:doc mdata)
                (next body)
                body)
        parts 
        ]
    `(merge {:name '~name} ~mdata {:body '~body})))

(defconstrainedfn sqr
  "Calculates the square of a number."


     :body
     (* n n)))

*assert*

(comment
  (def doubler-contract
