higherkindness.droste.data
Type members
Classlikes
Mu is the least fixed point of a functor F
. It is a computation that can
consume a inductive noninfinite structure in one go.
Mu is the least fixed point of a functor F
. It is a computation that can
consume a inductive noninfinite structure in one go.
In Haskell this can more aptly be expressed as: data Mu f = Mu (forall x . (f x -> x) -> x)
- Companion:
- object
Nu is the greatest fixed point of a functor F
. It is a computation that
can generate a coinductive infinite structure on demand.
Nu is the greatest fixed point of a functor F
. It is a computation that
can generate a coinductive infinite structure on demand.
In Haskell this can more aptly be expressed as: data Nu g = forall s . Nu (s -> g s) s
- Companion:
- object
Types
A fix point function for types that adds an additional attribute to each node in the resulting data structure.
A fix point function for types that adds an additional attribute to each node in the resulting data structure.
This is a cofree comonad.
Implemented as an obscured alias:
type Attr[F[_], A] = (A, F[Attr[F, A]])
The companion object can be used to translate between representations.
A fix point function for types that allows for the replacements of nodes in the data structure with values of a different type.
A fix point function for types that allows for the replacements of nodes in the data structure with values of a different type.
This is the dual of Attr and a very basic free monad.
This implementation is not lazy and is used strictly for data.
Implemented as an obscured alias:
type Coattr[F[_], A] = Either[A, F[Coattr[F, A]]]
The companion object can be used to translate between representations.