Groups all syntax extensions.
The Applicative
type-class is a Functor that also adds the
capability of lifting a value in the context.
A type-class providing the coflatMap
operation, the dual of
flatMap
.
A type-class providing the coflatMap
operation, the dual of
flatMap
.
To implement Cobind
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
The Comonad
type-class is the dual of Monad.
The Comonad
type-class is the dual of Monad. Whereas Monads
allow for the composition of effectful functions, Comonads allow
for composition of functions that extract the value from their
context.
To implement Comonad
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
A functor provides the map
operation that allows lifting an f
function into the functor context and applying it.
A functor provides the map
operation that allows lifting an f
function into the functor context and applying it.
To implement Functor
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
A type-class for F[A]
monads that are suspendable
and whose evaluation can be memoized, along with a guarantee
that the captured side-effects only happen once.
A type-class for F[A]
monads that are suspendable
and whose evaluation can be memoized, along with a guarantee
that the captured side-effects only happen once.
The memoize
operation takes an F[_]
instance and
returns a new F
that guarantees that its evaluation and
all related side-effects only happen once, with the results
to be reused on subsequent evaluations.
Note that the memoize
operation can be a no-op. For example
Scala's Future
doesn't need to do anything special as memoization
happens by default and idempotency is guaranteed.
The Monad
type-class is a structure that represents
computations defined as sequences of steps: : a type with
a monad structure defines what it means to chain operations
together, or nest functions of that type.
The Monad
type-class is a structure that represents
computations defined as sequences of steps: : a type with
a monad structure defines what it means to chain operations
together, or nest functions of that type.
See: Monads for functional programming
To implement Monad
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
The MonadError
type-class describes monads that can do error handling.
The MonadError
type-class describes monads that can do error handling.
To implement MonadError
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
To implement MonadEval
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been inspired by Cats and FS2.
The MonadFilter
type-class is equipped with an additional
operation which allows us to create an "Empty" value for the Monad
(for whatever "empty" makes sense for that particular monad).
The MonadFilter
type-class is equipped with an additional
operation which allows us to create an "Empty" value for the Monad
(for whatever "empty" makes sense for that particular monad). This
is of particular interest to us since it allows us to add a
filter
method to a Monad, which is used when pattern matching or
using guards in for comprehensions.
To implement MonadFilter
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
This type-class represents monads with a tail-recursive
flatMap
implementation.
This type-class represents monads with a tail-recursive
flatMap
implementation.
Based on Phil Freeman's Stack Safety for Free.
To implement MonadRec
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
MonoidK
is a universal monoid which operates on kinds.
MonoidK
is a universal monoid which operates on kinds.
To implement MonoidK
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
SemigroupK
is a universal semigroup which operates on kinds.
SemigroupK
is a universal semigroup which operates on kinds.
To implement SemigroupK
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
To implement Suspendable
:
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been inspired by Cats and FS2.
Provides syntax (extension methods) for usage of monix.types instances.
Provides syntax (extension methods) for usage of monix.types instances.
Usage:
import monix.types.syntax._
Do not combine with Cats or Scalaz syntax in the same context.
The
Applicative
type-class is a Functor that also adds the capability of lifting a value in the context.Described in Applicative Programming with Effects.
To implement
Functor
:The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.