 (defn >=>
   "Left-to-right composition of monads."
   [mf mg x]
-  (ctx/with-context (ctx/get-current mf)
+  (ctx/with-context (ctx/infer mf)
     (mlet [a (mf x)
            b (mg a)]
       (return b))))

   (fn [bv]
     (bimap f g bv)))
  ([f g bv]
   (let [ctx (ctx/get-current bv)]
     (ctx/with-context ctx
       (p/-bimap ctx f g bv)))))


  "Right-to-left composition of monads.
  Same as `>=>` with its first two arguments flipped."
  [mg mf x]
  (ctx/with-context (ctx/infer mf)
    (mlet [a (mf x)
           b (mg a)]
      (return b))))
