pub fn append<'a, ClonableFnBrand: 'a + ClonableFn, Brand: Semigroup1L0T>(
a: Apply1L0T<'a, Brand>,
) -> ApplyFn<'a, ClonableFnBrand, Apply1L0T<'a, Brand>, Apply1L0T<'a, Brand>>
Expand description
Associative operation that combines two values of the same type.
Free function version that dispatches to the type class’ associated function.
§Type Signature
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!"
);