   "The Identity transformer constructor."
   [inner-monad]
   (reify
-    proto/Monad
+    p/Monad
     (mreturn [_ v]
-      (identity (proto/mreturn inner-monad v)))
+      (identity (p/mreturn inner-monad v)))
 
     (mbind [_ mv f]
       nil)))

(def ^{:no-doc true}
  identity-monad
  (reify
    proto/Functor
    (fmap [_ f iv]
      (Identity. (f (.-v iv))))

    proto/Applicative
    (pure [_ v]
      (Identity. v))

    (fapply [_ af av]
      (Identity. ((.-v af) (.-v av))))

    proto/Monad
    (mreturn [_ v]
      (Identity. v))



(ns cats.monad.identity
  "The Identity Monad."
  (:require [cats.protocols :as p])
  (:refer-clojure :exclude [identity]))

(declare identity-monad)
