pub trait Functor<U>: HKT<U> {
// Required method
fn fmap<F>(&self, f: F) -> Self::T
where F: Fn(&Self::C) -> U;
}Expand description
§Functor
Formally, a functor describes the morphisms between categories.
A functor is a type that when mapped over, preserves the structure of the type while applying a function to the values within the type. Functors are useful for modeling the functional effects on values of parameterized data types.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.