Clojure(Script) built-in types extensions.
Clojure(Script) built-in types extensions.
Category Theory abstractions for Clojure
Category Theory abstractions for Clojure
Data structures that are used in various places of the library.
Data structures that are used in various places of the library.
No vars found in this namespace.
The Continuation Monad.
The Continuation Monad.
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]>
The Exception monad.
Also known as Try monad, popularized by Scala.
It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.
It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).
The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.
The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.
That is because when you will dereference the failure instance, it will reraise the containing exception.
The Exception monad. Also known as Try monad, popularized by Scala. It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different. It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs). The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead. The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads. That is because when you will dereference the failure instance, it will reraise the containing exception.
The Identity Monad.
The Identity Monad.
The Maybe monad implementation and helpers functions for working with maybe related types.
(require '[cats.monad.maybe :as maybe])
(maybe/just 1)
;; => #<Just [1]>
The Maybe monad implementation and helpers functions for working with maybe related types. (require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]>
The Reader Monad.
The Reader Monad.
The State Monad.
The State Monad.
The Writer Monad.
The Writer Monad.
Abstractions of Category Theory over that cats library is build.
Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.
Abstractions of Category Theory over that cats library is build. Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close