Module apply_second

Module apply_second 

Source
Expand description

A type class for sequencing two computations and keeping the result of the second.

§Examples

use fp_library::{brands::*, functions::*};

let x = Some(5);
let y = Some(10);
let z = apply_second::<OptionBrand, _, _>(x, y);
assert_eq!(z, Some(10));

Traits§

ApplySecond
A type class for types that support combining two contexts, keeping the second value.

Functions§

apply_second
Combines two contexts, keeping the value from the second context.