Functor¶
A functor is a type that can be mapped over. It must implement a function, usually called map or fmap, that applies a function to the values inside the functor, without altering the functor’s structure.
See also Functional Programming Principles in PHP – Functors, PHP Functional by widmogrod and pwm/functor.
Related : Functional Programming, __invoke() Method