Category theory is used to formalize mathematics and its concepts as a collection of objects and arrows (also called morphisms). Category theory can be used to formalize concepts of other high-level abstractions such as set theory, field theory, and group theory.
Several terms used in category theory, including the term "morphism", differ from their uses within mathematics itself.
In category theory, a "morphism" obeys a set of conditions specific to category theory itself. Thus, care must be taken to understand the context in which statements are made.
In mathematics, a category is an algebraic structure that comprises "objects" that are linked by "arrows".
YEAAAH, IF YOU COULD ACTUALLY DEFINE WHAT THIS IS ABOUT.
In many fields of mathematics, morphism refers to a structure-preserving mapping from one mathematical structure to another.
In set theory, morphisms are functions; in linear algebra, linear transformations; in group theory, group homomorphisms; in topology, continuous functions, and so on.
In category theory, morphism is a broadly similar idea, but somewhat more abstract: the mathematical objects involved need not be sets, and the relationship between them may be something more general than a map.
a type is a classification identifying one of various types of data,that determines the possible values for that type; the operations that can be done on values of that type [...]
a function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output.
val id = (x: Int) => x
val sqrt = (x: Int) => x * x
val random = () => scala.util.Random.nextInt
val const = (x: Int) => 42
A functor is a type of mapping between categories, which is applied in category theory. Functors can be thought of as homomorphisms between categories. In the category of small categories, functors can be thought of more generally as morphisms.
Endofunctor: A functor that maps a category to itself.
a monoid is an algebraic structure with a single associative binary operation and an identity element.
a monad is an (endo-)functor, together with two natural transformations.
natural transformation provides a way of transforming one functor into another while respecting the internal structure