The Either monad implementation and helper functions for working with either related types.
Also commonly known as Error monad.
(require '[cats.monad.either :as either])
(either/right 1)
;; => #<Right [1]>
(either/left 1)
;; => #<Left [1]>
The Either monad implementation and helper functions for working with either related types. Also commonly known as Error monad. (require '[cats.monad.either :as either]) (either/right 1) ;; => #<Right [1]> (either/left 1) ;; => #<Left [1]>
(either-transformer inner-monad)
The Either transformer constructor.
The Either transformer constructor.
(either? v)
Return true in case of v
is instance
of Either monad.
Return true in case of `v` is instance of Either monad.
(from-either mv)
Return inner value of either monad.
This is a specialized version of cats.core/extract
for Either monad.
The use of this function is DEPRECATED and
cats.core/extract
should be used.
Return inner value of either monad. This is a specialized version of `cats.core/extract` for Either monad. The use of this function is DEPRECATED and `cats.core/extract` should be used.
(left? v)
Return true if v
is an instance
of Left type.
Return true if `v` is an instance of Left type.
(right? v)
Return true if v
is an instance
of Right type.
Return true if `v` is an instance of Right type.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close