pub fn append<'a, Brand: Semigroup<'a>>(
a: Apply0<Brand>,
) -> ArcFn<'a, Apply0<Brand>, Apply0<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::StringBrand, functions::append};
assert_eq!(
append::<StringBrand>("Hello, ".to_string())("World!".to_string()),
"Hello, World!"
);