   (-repr [_]
     "#<Nothing>")
 
-  #?@(:cljs [cljs.core/ILookup
-             (-lookup
-               [this k]
-                 (if (= k :nothing) this nil))
-             (-lookup
-               [this k not-found]
-                 (if (= k :nothing) this not-found))]
-      :clj  [clojure.lang.ILookup
-             (valAt
-               [this k]
-                 (if (= k :nothing) this nil))
-             (valAt
-               [this k not-found]
-                 (if (= k :nothing) this not-found))])
-
   #?@(:cljs [cljs.core/IDeref
              (-deref [_] nil)]
       :clj  [clojure.lang.IDeref
-             (deref [_] nil)])
-
-  #?@(:clj
-      [Object
-       (equals [self other]
-         (instance? Nothing other))]
-      :cljs
-      [cljs.core/IEquiv
-       (-equiv [_ other]
-         (instance? Nothing other))]))
+             (deref [_] nil)]))
 
 (alter-meta! #'->Nothing assoc :private true)
 (alter-meta! #'->Just assoc :private true)


(declare context)

(deftype Just [v]
  p/Contextual
  (-get-context [_] context)

  p/Extract
  (-extract [_] v)

  p/Printable
  (-repr [_]
    (str "#<Just " (pr-str v) ">"))

  #?@(:cljs [cljs.core/ILookup
             (-lookup
               [this k]
                 (if (= k :just) @this nil))
             (-lookup
               [this k not-found]
                 (if (= k :just) @this not-found))]
      :clj  [clojure.lang.ILookup
             (valAt
               [this k]
                 (if (= k :just) @this nil))
             (valAt
               [this k not-found]
                 (if (= k :just) @this not-found))])

  #?@(:cljs [cljs.core/IDeref
             (-deref [_] v)]
      :clj  [clojure.lang.IDeref
             (deref [_] v)])

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

(deftype Nothing []
  p/Contextual
  (-get-context [_] context)


(defn nothing
  "A Nothing type constructor."
  []
  (assoc (Nothing.) :nothing nil))

(defn just?
  "Returns true if `v` is an instance
