Expand description
ApplyFirst type class.
This module defines the ApplyFirst trait, which provides the ability to sequence two computations
but discard the result of the second computation, keeping only the result of the first.
§Examples
use fp_library::{brands::*, functions::*};
let x = Some(5);
let y = Some(10);
let z = apply_first::<OptionBrand, _, _>(x, y);
assert_eq!(z, Some(5));Traits§
- Apply
First - A type class for types that support combining two contexts, keeping the first value.
Functions§
- apply_
first - Combines two contexts, keeping the value from the first context.