variadic_monoids-0.1.1 doesn't have any documentation.
VariadicMonoids
This small crate provides (experimental) support for creating variadic functions from monoids.
More simply, given a fn f(T,T) -> T
, this crate allows you to produce a variadic function f'
such that
f' == f
Where Identity is an identity operation on f. (Specifically, only f(a, identity) == a
must actually hold).
How to Use:
use *;
// You must create a name for your monoid with a struct. This allows you to
// create multiple monoids per type (and they can be for external too)
;
// Call the (constant function) gen_function to retrieve your function
// With type parameters as the implemented Type, and Name of your monoid.
const sum: = ;
In your Cargo.toml
[dependencies]
...
variadic_monoids="0.1.1"