Skip to main content

Module ref_apply_second

Module ref_apply_second 

Source
Expand description

Combining two by-ref contexts, keeping the second value, with ref_apply_second.

This is the by-ref counterpart of ApplySecond.

§Examples

use fp_library::{
	brands::*,
	functions::{
		explicit::apply_second,
		*,
	},
	types::*,
};

let x = RcLazy::pure(3);
let y = RcLazy::pure(4);
let result = apply_second::<LazyBrand<RcLazyConfig>, _, _, _, _>(&x, &y);
assert_eq!(*result.evaluate(), 4);

Traits§

RefApplySecond
A type class for combining two by-ref contexts, keeping the second value.

Functions§

ref_apply_second
Combines two contexts, keeping the value from the second.