Expand description
Types that can be mapped over by receiving references to their contents, with thread-safe mapping functions.
§Examples
use fp_library::{
brands::*,
functions::*,
types::*,
};
let memo = ArcLazy::new(|| 10);
let mapped = send_ref_map::<LazyBrand<ArcLazyConfig>, _, _>(|x: &i32| *x * 2, &memo);
assert_eq!(*mapped.evaluate(), 20);Traits§
- Send
RefFunctor - A type class for types that can be mapped over, receiving references, with thread-safe functions.
Functions§
- send_
ref_ map - Maps a thread-safe function over the values in the functor context, where the function takes a reference.