/Я 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:

`yo` : target ( t a ) ( target ( source a o ) ( t o ) )
`ya` : target ( t a ) ( target ( source o a ) ( t o ) )

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

`yo'yo` : target ( t ( tt a ) ) ( target ( source a o ) ( t ( tt o ) ) )
`yo'ya` : target ( t ( tt a ) ) ( target ( source o a ) ( t ( tt o ) ) )
`ya'yo` : target ( t ( tt a ) ) ( target ( source o a ) ( t ( tt o ) ) )
`ya'ya` : target ( t ( tt a ) ) ( target ( source a o ) ( t ( tt o ) ) )