[−][src]Trait higher_cat::Functor
A Functor
lets you change the type parameter of a generic type.
A Functor
defines a method map
on a type F<_>: Functor
which converts
an F<A>
to F<B>
using a function Fn(A) -> B
applied to the A
s inside
it.
You can also use this just to modify the values inside your container value without changing their type, if the mapping function returns a value of the same type. This is called an "endofunctor."
Required methods
Loading content...Implementations on Foreign Types
impl<A, B> Functor<A, B> for Option<A>
[src]
impl<A, B, E> Functor<A, B> for Result<A, E>
[src]
impl<A, B> Functor<A, B> for Vec<A>
[src]
impl<A, B, S> Functor<A, B> for HashSet<A, S> where
A: Hash + Eq,
B: Hash + Eq,
S: BuildHasher + Default,
[src]
A: Hash + Eq,
B: Hash + Eq,
S: BuildHasher + Default,
impl<A, B> Functor<A, B> for BTreeSet<A> where
A: Ord,
B: Ord,
[src]
A: Ord,
B: Ord,
impl<A, B, C, D, S> Functor<(A, B), (C, D)> for HashMap<A, B, S> where
A: Hash + Eq,
B: Hash + Eq,
C: Hash + Eq,
D: Hash + Eq,
S: BuildHasher + Default,
[src]
A: Hash + Eq,
B: Hash + Eq,
C: Hash + Eq,
D: Hash + Eq,
S: BuildHasher + Default,
impl<A, B, C, D> Functor<(A, B), (C, D)> for BTreeMap<A, B> where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
[src]
A: Ord,
B: Ord,
C: Ord,
D: Ord,
impl<A, B> Functor<A, B> for VecDeque<A>
[src]
impl<A, B> Functor<A, B> for LinkedList<A>
[src]
impl<A, B> Functor<A, B> for BinaryHeap<A> where
A: Ord,
B: Ord,
[src]
Loading content...
A: Ord,
B: Ord,