Skip to main content

oxilean_std/functor/
vecfunctor_traits.rs

1//! # VecFunctor - Trait Implementations
2//!
3//! This module contains trait implementations for `VecFunctor`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Functor`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::functions::Functor;
12use super::types::VecFunctor;
13
14impl<A> Functor<A> for VecFunctor<A> {
15    type Mapped<B> = VecFunctor<B>;
16    fn fmap<B, F: Fn(A) -> B>(self, f: F) -> VecFunctor<B> {
17        VecFunctor(self.0.into_iter().map(f).collect())
18    }
19}