Crate amonoid

Source
Expand description

A crate about monoids.

§Crate Features

This crate supports the following feature flags, none of which are enabled by default:

§A note about equality

Some sections in the documentation use equality to state rules that must hold. Strictly speaking, this would of course require the types in question to impl Eq. However, since these requirements aren’t enforced anyway, it is up to the library consumer’s discretion to ensure these on a “best effort” basis. For example, you might want to consider f32 and f64 as monoids under addition or multiplication, even tho they are very much non-associative in general, since they are approximately associative for “tame” inputs (not too large and not too small).

Modules§

from_ops
Monoids constructed from existing operations.
hom
Monoid homomorphisms
list
The list monoid.
ops
Operational types that allow the use of the monoid operation as an operator.

Macros§

impl_all_monoid_hom
A helper macro that implements all lower tiers of Hom* for you, so you don’t have to repeat yourself so much when implementing HomMut, Hom, or HomStatic.

Structs§

Opposite
The opposite monoid (wiki), where combine(a, b) = M::combine(b, a).

Traits§

Monoid
A monoid.
MonoidBorrowed
The Borrowed version of a Monoid.
PreMonoidBorrowed
A Borrow of a Monoid.