pub trait Semigroup {
    fn combine(&self, other: &Self) -> Self;
}
Expand description

A Semigroup is a class of thing that has a definable combine operation

Required Methods§

Associative operation taking which combines two values.

Examples
use frunk::Semigroup;

assert_eq!(Some(1).combine(&Some(2)), Some(3))
Run

Implementations on Foreign Types§

Implementors§

Since () + () = (), the same is true for HNil

Allow the combination of any two HLists having the same structure if all of the sub-element types are also Semiups