Cats Api Documentation

Version: 1.2.0

cats.labs.reader

The Reader Monad.

MonadReader

protocol

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

members

-ask

(-ask m)

Return the current environment.

-local

(-local m f reader)

Create a reader in a modified version of the environment.

reader

(reader f)

The Reader type constructor.

The purpose of Reader type is wrap a simple function that fullfill the reader signature.

It exists just for avoid extend the clojure function type because is very generic type.

reader-t

(reader-t inner-monad)

The Reader transformer constructor.

reader?

(reader? s)

Return true if s is instance of Reader type.

run-reader

(run-reader reader seed)

Given a Reader instance, execute the wrapped computation and returns a value.