append

Function append 

Source
pub fn append<'a, ClonableFnBrand: 'a + ClonableFn, Brand: Semigroup + Sized>(
    a: Brand,
) -> ApplyFn<'a, ClonableFnBrand, Brand, Brand>
Expand description

Associative operation that combines two values of the same type.

Free function version that dispatches to the typeclass’ associated function.

§Type Signature

forall a. Semigroup a => a -> a -> a

§Parameters

  • a: First value to combine.
  • b: Second value to combine.

§Returns

The result of combining the two values using the semigroup operation.

§Examples

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

assert_eq!(
    append::<RcFnBrand, String>("Hello, ".to_string())("World!".to_string()),
    "Hello, World!"
);