   [type]
   (cond
    (alternating? type) (expand-alternating type)
-   (many-type? type) (expand-many type)
-   :else type))
+   (many-type? type)   (expand-many type)
+   :else               type))
 
 (defn- expand-type-sig
   [sig]

                                              (= val "raw")
                                              (= val "flac")))}

   :sample-format    {:desc "a string representing the sound sample format - one of \"int8\", \"int16\", \"int24\", \"int32\", \"float\", \"double\", \"mulaw\", \"alaw\""
                      :validator (fn [val] (or (= val "int8")
                                              (= val "int16")
                                              (= val "int24")


(defn- arity-mismatch?
  [s-arity a-arity]
  (and (not (= Float/POSITIVE_INFINITY s-arity))
       (not (= s-arity a-arity))))

(defn- error-args
  [sig args]
  (some (fn [[type arg]] (if (not (valid? type arg))
                          [type arg]
                          false))
