Trait frunk::semigroup::Semigroup[][src]

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