   (:require-macros [cljs.core.async.macros :refer [go]])
 
   #+cljs
-  (:require [cljs.core.async :refer [chan put! take! <!]]
+  (:require [cljs.core.async :refer [chan put! take! <! pipe]]
             [cljs.core.async.impl.channels :as implch]
             [cljs.core.async.impl.protocols :as impl]
             [cljs.core.async.impl.dispatch :as dispatch]

        channel))

    (mbind [mn mv f]
      (let [ctx m/*context*]
        (go
          (let [v (<! mv)
                r (m/with-monad ctx
                    (f v))]
            (if (satisfies? impl/ReadPort r)
              (<! r)
              r)))))))

(extend-type #+clj clojure.core.async.impl.channels.ManyToManyChannel
             #+cljs cljs.core.async.impl.channels.ManyToManyChannel

            [cats.protocols :as proto])

  #+clj
  (:require [clojure.core.async :refer [go chan put! take! <! pipe]]
            [clojure.core.async.impl.protocols :as impl]
            [clojure.core.async.impl.dispatch :as dispatch]
            [cats.core :as m]
