             (call-rescue events children)))))))
 
 
-; Conj events onto the given reference
 (defn append [reference]
+  "Conj events onto the given reference"
   (fn [event]
     (dosync
       (alter reference conj event))))
 
-; Set reference to the most recent event that passes through.
 (defn register [reference]
+  "Set reference to the most recent event that passes through."
   (fn [event]
     (dosync (ref-set reference event))))
 
-; Prints an event to stdout
 (defn stdout [event]
+  "Prints an event to stdout"
   (fn [event]
     (prn event)))
 
-; Sends a map to a client, coerced to state
 (defn fwd [client]
+  "Sends a map to a client, coerced to state"
   (fn [statelike]
     (reimann.client/send-state client statelike)))
 

      (dosync
        (add (deref current) event)))))

; Take the sum of every event over interval seconds and divide by the interval
; size.
(defn rate [interval & children]
  (part-time-fast interval
      (fn [] {:count (ref 0)
              :state (ref {})})

              true)))
        (call-rescue event children)))))

(defn within [r & children]
  "Passes on events only when their metric falls within the given inclusive
  range. (within [0 1] (fn [event] do-something))"
  (fn [event]
    (when (<= (first r) (:metric_f event) (last r))
      (call-rescue event children))))
