                       (when (< 0 wait)
                         (<! (timeout wait)))
 
-                      (recur (ease-fn (/ since duration)) since speed-new))))))))
+                      (recur (ease-fn (/ since duration))
+                             since
+                             speed-new)))))
+       out)))
 
 ;; (transition {} {})

(defn tween
  [state target]
  (fn [t]
    ))

(defn transition
  ([state target] (transition state target 500))
  ([state target duration] (transition state target duration :linear))
  ([state target duration ease]
     (let [start (t/now)
           ease-fn (get ease-fns ease)
           speed-target 16
           speed-tolerance 1
           speed-step 0.5]

                 last-time start
                 wait speed-target]
                (let [since (time-since start)]
                  (put! out (tween-fn t))

                  (when (< since duration)

