pub fn append<S: Semigroup>(a: S, b: S) -> SExpand description
The result of combining the two values using the semigroup operation.
Free function version that dispatches to the type class’ associated function.
§Type Signature
forall s. Semigroup s => (s, s) -> s
§Type Parameters
S: The type of the semigroup.
§Parameters
a: The first value.b: The second value.
§Returns
The combined value.
§Examples
use fp_library::functions::*;
let x = "Hello, ".to_string();
let y = "World!".to_string();
let z = append::<_>(x, y);
assert_eq!(z, "Hello, World!".to_string());