Function constant

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

Returns its first argument.

forall a b. a -> b -> a

Examples

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