 
 (defn branch
   "Given an either value and two functions, if the either is a
-   left apply the first function to the value it contains; if the
-   either is a right apply the second function to its value."
+  left apply the first function to the value it contains; if the
+  either is a right apply the second function to its value."
   [e lf rf]
   {:pre [(either? e)]}
   (if (left? e)
-    (lf (m/extract e))
-    (rf (m/extract e))))
+    (lf (proto/extract e))
+    (rf (proto/extract e))))
 
 (defn branch-left
   "Given an either value and a function, if the either is a

  [e]
  {:pre [(either? e)]}
  (if (left? e)
    (right (m/extract e))
    (left (m/extract e))))

      (either/left 1)
      ;; => #<Left [1]>
  "
  (:require [cats.protocols :as proto]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Type constructor and functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(declare either-monad)

(deftype Right [v]
  proto/Context
