         (ok? sv) sv
         :else sv'))
 
-    proto/Monoid
+    p/Monoid
     (mempty [_]
       (fail))
 
-    proto/Functor
+    p/Functor
     (fmap [_ f s]
       (if (ok? s)
         (ok (f (.-v s)))
         s))
 
-    proto/Foldable
+    p/Foldable
     (foldl [_ f z mv]
       (if (ok? mv)
-        (f z (proto/extract mv))
+        (f z (p/extract mv))
         z))
 
     (foldr [_ f z mv]
       (if (ok? mv)
-        (f (proto/extract mv) z)
+        (f (p/extract mv) z)
         z))
 
-    proto/Applicative
+    p/Applicative
     (pure [_ v]
       (ok v))
 

  "Return true in case of `v` is instance
  of the Validation applicative."
  [v]
  (if (satisfies? proto/Context v)
    (identical? (proto/get-context v) validation-applicative)
    false))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(ns cats.applicative.validation
  "The Validation applicative implementation and helper functions
  for validating values. Isomorphic to Either."
  (:require [cats.protocols :as p]
            [cats.core :as m]
            [cats.monad.either :as either]))

