Functor
A Functor is a concept from category theory in mathematics and computer science that describes a mapping between categories. It allows for the transformation of objects and morphisms (arrows) from one category to another while preserving the structure of those categories. In programming, functors are often used in functional programming languages to apply functions to values wrapped in a context, such as lists or options.
In languages like Haskell or Scala, functors provide a way to work with data types that can be transformed. For example, if you have a list of numbers, a functor can help you apply a function to each number in the list without having to manually iterate through it. This makes code more concise and expressive, promoting a functional programming style.