TypeClasses.jl
Documentation for TypeClasses.
TypeClasses defines general programmatic abstractions taken from Scala cats and Haskell TypeClasses.
The following interfaces are defined:
TypeClass | Methods | Description |
---|---|---|
Functor | Base.map | The basic definition of a container or computational context. |
Applicative | Functor & TypeClasses.pure & TypeClasses.ap (automatically defined when map and flatmap are defined) | Computational context with support for parallel execution. |
Monad | Applicative & TypeClasses.flatmap | Computational context with support for sequential, nested execution. |
Semigroup | TypeClasses.combine , alias ⊕ | The notion of something which can be combined with other things of its kind. |
Monoid | Semigroup & TypeClasses.neutral | A semigroup with a neutral element is called a Monoid, an often used category. |
Alternative | TypeClasses.neutral & TypeClasses.orelse , alias ⊘ | Slightly different than Monoid, the orelse semantic does not merge two values, but just takes one of the two. |
FlipTypes | TypeClasses.flip_types | Enables 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
TypeClasses.DataTypes.States.getstate
TypeClasses.DataTypes.Callable
TypeClasses.DataTypes.Iterables.Iterable
TypeClasses.DataTypes.States.State
TypeClasses.DataTypes.Writers.Writer
TypeClasses.:↠
TypeClasses.:⊕
TypeClasses.:⊘
TypeClasses.DataTypes.States.putstate
TypeClasses.DataTypes.Writers.getaccumulator
TypeClasses.ap
TypeClasses.combine
TypeClasses.default_flip_types_having_pure_combine_apEltype
TypeClasses.flatmap
TypeClasses.flatten
TypeClasses.flip_types
TypeClasses.foldl_monoid
TypeClasses.foldr_monoid
TypeClasses.mapn
TypeClasses.neutral
TypeClasses.orelse
TypeClasses.pure
TypeClasses.reduce_monoid
TypeClasses.tupled
TypeClasses.@mapn
TypeClasses.@syntax_flatmap
TypeClasses.@syntax_foreach
TypeClasses.@syntax_map