 ;; Monad transformer definition
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defn maybe-transformer [inner-monad]
+(defn maybe-transformer
+  "The maybe transformer constructor."
+  [inner-monad]
   (reify
     proto/Functor
     (fmap [_ f fv]

    false))

(defn just
  ([v]
     (Just. v))
  ([]
     (Just. nil)))

(defn nothing
  []
  (Nothing.))

(defn just?
  [v]
  (instance? Just v))

(defn nothing?
  [v]
  (or
   (nil? v)
   (instance? Nothing v)))

(defn from-maybe
  "Return inner value from maybe monad. Accepts an optional default value.

  Let see some examples:

      (from-maybe (just 1))
      ;=> 1
      (from-maybe (just 1) 42)
      ;=> 1
      (from-maybe (nothing))
      ;=> nil
      (from-maybe (nothing) 42)
      ;=> 42
  "

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

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Monad definition
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(def ^{:no-doc true}
  maybe-monad
  (reify
    proto/Functor
    (fmap [_ f mv]
