TypeClasses.jl

Documentation for TypeClasses.

TypeClasses defines general programmatic abstractions taken from Scala cats and Haskell TypeClasses.

The following interfaces are defined:

TypeClassMethodsDescription
Functor Base.mapThe basic definition of a container or computational context.
ApplicativeFunctor & TypeClasses.pure & TypeClasses.ap (automatically defined when map and flatmap are defined)Computational context with support for parallel execution.
MonadApplicative & TypeClasses.flatmapComputational context with support for sequential, nested execution.
SemigroupTypeClasses.combine, alias The notion of something which can be combined with other things of its kind.
MonoidSemigroup & TypeClasses.neutralA semigroup with a neutral element is called a Monoid, an often used category.
AlternativeTypeClasses.neutral & TypeClasses.orelse, alias Slightly different than Monoid, the orelse semantic does not merge two values, but just takes one of the two.
FlipTypesTypeClasses.flip_typesEnables dealing with nested types. Transforms an A{B{C}} into an B{A{C}}.

For convenience this packages further provides a couple of standard DataTypes and implements the interfaces for them.

Manual Outline

Library Index