/Я language (β)/Glossary/Functor/

Functor is a mapping between categories. Depends the way functors map morphisms they could be either covariant or contravariant. Covariant functors map morphisms as it is, contravariant functors flip morphisms:

: source a o `AR_` target ( t a ) ( t o ) | covariant
: source o a `AR_` target ( t a ) ( t o ) | contravariant

Functors which map from (source) and into (target) the same category are called endo functors.

: target a o `AR_` target ( t a ) ( t o ) | covariant
: target o a `AR_` target ( t a ) ( t o ) | contravariant

Functor mapping operators in Я are Yonedified:

`y`² : target ( t a ) ( target ( source ( o ) ) ( t o ) )
`y`² : target ( t a ) ( target ( source ( o ) ) ( t o ) )

We compose functors by treating one of them as an argument of another one:

`yundefined'yundefined`² : target ( t ( tt a ) ) ( target ( source ( o ) ( a )) ( t ( tt o ) ) )
`yundefined'yundefined`² : target ( t ( tt a ) ) ( target ( source ( o ) ( a )) ( t ( tt o ) ) )
`yundefined'yundefined`² : target ( t ( tt a ) ) ( target ( source ( o ) ( a )) ( t ( tt o ) ) )
`yundefined'yundefined`² : target ( t ( tt a ) ) ( target ( source ( o ) ( a )) ( t ( tt o ) ) )