     (println (apply str (interpose " -> " cat)))))
 
 (def UGEN-RATE-SORT-FN
-  (apply hash-map (flatten (map reverse (indexed UGEN-RATE-PRECEDENCE)))))
+  (zipmap UGEN-RATE-PRECEDENCE (range (count UGEN-RATE-PRECEDENCE)))
 
 (defn- print-ugen-rates [rates]
   (let [rates (sort-by UGEN-RATE-SORT-FN rates)]


(defn control? [obj]
  (isa? (type obj) ::control))

;; TODO:
;; * Need to write a function that takes a ugen-spec, and generates a set
;; of ugen functions for that spec.  Each of these functions will automatically
;; set the rate for the ugen.

(defn- ugen-docs
  "Create a string representing the documentation for the given ugen-spec."

    [overtone util]
    [overtone.sc.ugen special-ops common categories]
    [clojure.contrib.types :only (deftype)]
    [clojure.contrib.generic :only (root-type)])
  (:require
    overtone.sc.core
    [clojure.set :as set]
