 
 ;; defn, defn-, fn
 
-(s/def ::arg-list
+(s/def ::param-list
   (s/and
     vector?
-    (s/cat :args (s/* ::binding-form)
-           :varargs (s/? (s/cat :amp #{'&} :form ::binding-form)))))
-
-(s/def ::args+body
-  (s/cat :args ::arg-list
+    (s/cat :params (s/* ::binding-form)
+           :var-params (s/? (s/cat :ampersand #{'&} :var-form ::binding-form)))))
+
+(s/def ::params+body
+  (s/cat :params ::param-list
          :body (s/alt :prepost+body (s/cat :prepost map?
                                            :body (s/+ any?))
                       :body (s/* any?))))
 
 (s/def ::defn-args
-  (s/cat :name simple-symbol?
+  (s/cat :fn-name simple-symbol?
          :docstring (s/? string?)
          :meta (s/? map?)
-         :bs (s/alt :arity-1 ::args+body
-                    :arity-n (s/cat :bodies (s/+ (s/spec ::args+body))
-                                    :attr (s/? map?)))))
+         :fn-tail (s/alt :arity-1 ::params+body
+                         :arity-n (s/cat :bodies (s/+ (s/spec ::params+body))
+                                         :attr-map (s/? map?)))))
 
 (s/fdef clojure.core/defn
   :args ::defn-args


(s/def ::ns-refer-clojure
  (s/spec (s/cat :clause #{:refer-clojure}
                 :filters ::filters)))

(s/def ::refer (s/or :all #{:all}
                     :syms (s/coll-of simple-symbol?)))

(s/def ::local-name (s/and simple-symbol? #(not= '& %)))

(s/def ::binding-form
  (s/or :local-symbol ::local-name
        :seq-destructure ::seq-binding-form
        :map-destructure ::map-binding-form))

;; sequential destructuring

(s/def ::seq-binding-form
  (s/and vector?
         (s/cat :forms (s/* ::binding-form)
                :rest-forms (s/? (s/cat :ampersand #{'&} :form ::binding-form))
                :as-form (s/? (s/cat :as #{:as} :as-sym ::local-name)))))

;; map destructuring

