 (ns common.async
-  (:refer-clojure :exclude [map mapcat filter remove distinct concat take-while drop-while complement keep reduce])
+  (:refer-clojure :exclude [map mapcat filter remove distinct concat take-while drop-while complement keep reduce delay])
   (:require-macros [cljs.core.async.macros :refer [go alt! go-loop]]
                    [common.async :refer [dochan go-catch <? <!expand]])
   (:require [goog.net.Jsonp]

      c ([x] x)
      (async/timeout msec) (ex-info (str "Timeout " msec "ms") {::timeout msec}))))

(defn wait-for
  ([f] (wait-for f 100))
  ([f interval]

       (if (f)
         (async/close! c)
         (do
           (<! (delay interval))
           (recur))))
     c)))
