Liking cljdoc? Tell your friends :D

cats.protocols

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.
raw docstring

Applicativeclj/sprotocol

The Applicative abstraction.

The Applicative abstraction.

fapplyclj/s

(fapply app af av)

Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.

Applies the function(s) inside ag's context to the value(s)
inside av's context while preserving the context.

pureclj/s

(pure app v)

Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx

Takes any context monadic value ctx and any value v, and puts
the value v in the most minimal context of same type of ctx
sourceraw docstring

Contextclj/sprotocol

Abstraction that establish a membership of types with one concrete monad.

This is a way that cats establishes the relation between a type and the monad that that should play.

A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.

Abstraction that establish a membership of types
with one concrete monad.

This is a way that cats establishes the relation
between a type and the monad that that should play.

A great example es Maybe monad type Just. It implements
this abstraction for establish that Just is part of
Maybe monad.

get-contextclj/s

(get-context _)

Get the monad instance for curent value.

Get the monad instance for curent value.
sourceraw docstring

Extractclj/sprotocol

A type class responsible of extract the value from a monad context.

A type class responsible of extract the
value from a monad context.

extractclj/s

(extract mv)

Extract the value from monad context.

Extract the value from monad context.
sourceraw docstring

Functorclj/sprotocol

The Functor abstraction.

The Functor abstraction.

fmapclj/s

(fmap ftor f fv)

Applies function f to the value(s) inside the context of the functor fv.

Applies function f to the value(s) inside the context of the functor fv.
sourceraw docstring

Monadclj/sprotocol

The Monad abstraction.

The Monad abstraction.

mbindclj/s

(mbind m mv f)

mreturnclj/s

(mreturn m v)
sourceraw docstring

MonadPlusclj/sprotocol

A complement abstraction for Monad that supports the notion of addition.

A complement abstraction for Monad that
supports the notion of addition.

mplusclj/s

(mplus m mv mv')

An associative addition operation.

An associative addition operation.
sourceraw docstring

MonadReaderclj/sprotocol

A specific case of Monad abstraction that allows a read only access to an environment.

A specific case of Monad abstraction that
allows a read only access to an environment.

askclj/s

(ask m)

Return the current environment.

Return the current environment.

localclj/s

(local m f reader)

Create a reader in a modified version of the environment.

Create a reader in a modified version of the environment.
sourceraw docstring

MonadStateclj/sprotocol

A specific case of Monad abstraction for work with state in pure functional way.

A specific case of Monad abstraction for
work with state in pure functional way.

get-stateclj/s

(get-state m)

Return the current state.

Return the current state.

put-stateclj/s

(put-state m newstate)

Update the state.

Update the state.

swap-stateclj/s

(swap-state m f)

Apply a function to the current state and update it.

Apply a function to the current state and update it.
sourceraw docstring

MonadTransclj/sprotocol

A common abstraction for all monad transformers.

A common abstraction for all monad transformers.

baseclj/s

(base mt)

Return the base monad of this transformer.

Return the base monad of this transformer.

innerclj/s

(inner mt)

Return the monad that this transformer wraps.

Return the monad that this transformer wraps.

liftclj/s

(lift m mv)

Lift a value from the parameterized monad to the transformer.

Lift a value from the parameterized monad to the transformer.
sourceraw docstring

MonadWriterclj/sprotocol

A specific case of Monad abstraction that allows emulate write operations in pure functional way.

A great example is writing a log message.

A specific case of Monad abstraction that
allows emulate write operations in pure functional
way.

A great example is writing a log message.

listenclj/s

(listen m mv)

Given a writer, yield a (value, log) pair as a value.

Given a writer, yield a (value, log) pair as a value.

passclj/s

(pass m mv)

Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.

Given a writer whose value is a pair with a function as its second element,
yield a writer which has the first element of the pair as the value and
the result of applying the aforementioned function to the log as the new log.

tellclj/s

(tell m v)

Add the given value to the log.

Add the given value to the log.
sourceraw docstring

MonadZeroclj/sprotocol

A complement abstraction for monad that supports the notion of an identity element.

A complement abstraction for monad that
supports the notion of an identity element.

mzeroclj/s

(mzero m)

The identity element for ctx.

The identity element for `ctx`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close