constant

Function constant 

Source
pub fn constant<'a, ClonableFnBrand: 'a + ClonableFn, A: 'a + Clone, B: Clone>(
    a: A,
) -> ApplyFn<'a, ClonableFnBrand, B, A>
Expand description

Returns its first argument.

§Type Signature

forall a b. a -> b -> a

§Parameters

  • a: A value.
  • b: Some other value.

§Returns

The first value.

§Examples

use fp_library::{brands::RcFnBrand, functions::constant};

assert_eq!(
    constant::<RcFnBrand, _, _>(true)(false),
    true
);