Function constant

Source
pub fn constant<A, B>(a: A) -> impl Fn(B) -> A
where A: Clone, B: Clone,
Expand description

forall a b. a -> b -> a

Returns its first argument.

Examples

use fp_library::{functions::constant};
assert_eq!(constant(true)(false), true);