Expand description
Combining two by-ref contexts, keeping the first value, with ref_apply_first.
This is the by-ref counterpart of ApplyFirst.
§Examples
use fp_library::{
brands::*,
functions::{
explicit::apply_first,
*,
},
types::*,
};
let x = RcLazy::pure(3);
let y = RcLazy::pure(4);
let result = apply_first::<LazyBrand<RcLazyConfig>, _, _, _, _>(&x, &y);
assert_eq!(*result.evaluate(), 3);Traits§
- RefApply
First - A type class for combining two by-ref contexts, keeping the first value.
Functions§
- ref_
apply_ first - Combines two contexts, keeping the value from the first.