This package provides methods for a computation which allows reading external records.

A Reader<R, A> object represents a computation, reading R and returning A:

type Reader<R, A> = (record: R) => A;
// Note that the actual code is defined as a special case of `ReaderT`.

And you can work with it by the following methods:

  • withReader - Constructs a new Reader from your computation.
  • ask - Makes a pure computation reading the record.
  • compose - Composes two Readers.
  • local - Localizes record to be read.
  • run - Runs a computation with specified records.
  • weaken - Makes the record type weaker for application.
  • Monad operations:

Moreover a ReaderT<R, M, A> monad transformer is the generalized version of Reader<R, A>. It accepts not A, but object on monad M.

Index

Interfaces

Type Aliases

Variables

Functions

Generated using TypeDoc