Module
Data.NaturalTransformation
#NaturalTransformation
type NaturalTransformation f g = forall a. f a -> g a
A type for natural transformations.
A natural transformation is a mapping between type constructors of kind
* -> *
where the mapping operation has no ability to manipulate the
inner values.
An example of this is the fromFoldable
function provided in
purescript-lists
, where some foldable structure containing values of
type a
is converted into a List a
.
The definition of a natural transformation in category theory states that
f
and g
should be functors, but the Functor
constraint is not
enforced here; that the types are of kind * -> *
is enough for our
purposes.
#type (~>)
Operator alias for Data.NaturalTransformation.NaturalTransformation (right-associative / precedence 4)
Modules
- Control.Applicative
- Control.Apply
- Control.Bind
- Control.Category
- Control.Monad
- Control.Semigroupoid
- Data.Boolean
- Data.BooleanAlgebra
- Data.Bounded
- Data.CommutativeRing
- Data.DivisionRing
- Data.Eq
- Data.EuclideanRing
- Data.Field
- Data.Function
- Data.Functor
- Data.HeytingAlgebra
- Data.Monoid
- Data.Monoid.Additive
- Data.Monoid.Conj
- Data.Monoid.Disj
- Data.Monoid.Dual
- Data.Monoid.Endo
- Data.Monoid.Multiplicative
- Data.NaturalTransformation
- Data.Ord
- Data.Ord.Unsafe
- Data.Ordering
- Data.Ring
- Data.Semigroup
- Data.Semigroup.First
- Data.Semigroup.Last
- Data.Semiring
- Data.Show
- Data.Symbol
- Data.Unit
- Data.Void
- Effect
- Effect.Class
- Effect.Class.Console
- Effect.Console
- Effect.Uncurried
- Effect.Unsafe
- Main
- PSCI.Support
- Prelude
- Prim
- Prim.Ordering
- Prim.Row
- Prim.RowList
- Prim.Symbol
- Prim.TypeError
- Record.Unsafe
- Type.Data.Boolean
- Type.Data.Ordering
- Type.Data.Row
- Type.Data.RowList
- Type.Data.Symbol
- Type.Equality
- Type.Prelude
- Type.Proxy
- Type.Row
- Type.Row.Homogeneous