 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (deftype Just [v]
-  proto/Context
+  p/Context
   (get-context [_] maybe-monad)
 
-  proto/Extract
+  p/Extract
   (extract [_] v)
 
   #?(:clj clojure.lang.IDeref

         (with-out-str (print [v])))])

  #?@(:cljs
       [cljs.core/IEquiv
        (-equiv [_ other]
                (if (instance? Just other)
                  (= v (.-v other))
                  false))]))

(deftype Nothing []
  proto/Context
  (get-context [_] maybe-monad)

  proto/Extract
  (extract [_] nil)

  #?(:clj clojure.lang.IDeref

  ([mv]
   {:pre [(maybe? mv)]}
   (when (just? mv)
     (p/extract mv)))
  ([mv default]
   {:pre [(maybe? mv)]}
   (if (just? mv)
     (p/extract mv)
     default)))

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