API Reference Witchcraft v1.0.4


Top level module

Applicative extends Apply with the ability to lift value into a particular data type or "context".

An extension of Witchcraft.Functor, Apply provides a way to apply arguments to functions when both are wrapped in the same kind of container. This can be seen as running function application "in a context".

Protocol for the Elixir.Witchcraft.Apply type class

Arrows abstract the idea of computations, potentially with a context.

Protocol for the Elixir.Witchcraft.Arrow type class

Similar to Witchcraft.Functor, but able to map two functions over two separate portions of some data structure (some product type).

A category is some collection of objects and relationships (morphisms) between them.

Chain function applications on contained data that may have some additional effect

Protocol for the Elixir.Witchcraft.Chain type class

The dual of monads, Comonad brings an unwrapping function to Extendable data.

Extend is essentially "coChain", meaning that it reverses the relationships in Chain.

Data that can be folded over to change its structure by altering or combining elements.

Represent the error state of trying to fold over an empty structure

Functors are datatypes that allow the application of functions to their interior values. Always returns data in the same structure (same size, tree layout, and so on).

A module for handling use Witchcraft and other modules

Very similar to Chain, Monad provides a way to link actions, and a way to bring plain values into the correct context (Applicative).

Protocol for the Elixir.Witchcraft.Monad type class

Monoid extends the semigroup with the concept of an "empty" or "zero" element.

Ord describes how to order elements of a data type.

Protocol for the Elixir.Witchcraft.Ord type class

A semigroup is a structure describing data that can be appendenated with others of its type. That is to say that appending another list returns a list, appending one map to another returns a map, and appending two integers returns an integer, and so on.

A semigroupoid describes some way of composing morphisms on between some collection of objects.

A setoid is a type with an equivalence relation.

Walk through a data structure from left to right, running some action on each element in turn.

The unit or Void type. A stand in for "no added information here".