       out)))
 
 (defn fps
+  "Takes desired number of frames per second (fps). The resulting signal gives
+  a sequence of time deltas as quickly as possible until it reaches the desired
+  FPS. A time delta is the time between the last frame and the current frame."
   [n]
   (z/input 0 [::fps n] (fps-channel-fn n)))
 
-(defn every-channel-fn
+(defn- every-channel-fn
   [ms]
   (fn [graph opts]
     (let [out (async/chan)]

(def minute (* 60 second))
(def hour (* 60 minute))

(defn in-milliseconds [n] (/ n millisecond))
(defn in-seconds [n] (/ n second))
(defn in-minutes [n] (/ n minute))
(defn in-hours [n] (/ n hour))

(defn fps-channel-fn
  [n]
  (fn [graph opts]
    (let [ms-per-frame (/ 1000 n)


#+cljs
(defn debounce
  "Returns a signal which relays the latest value from `sig` only after `ms`
  milliseconds have passed since `sig` last updated. Useful when you want to
  wait until a user stops typing before doing something with the text, for
  example."
  [ms sig]
  (let [timeouts (->> sig (since ms) (z/keep-if not false))]
    (->> sig (z/sample-on timeouts))))
