pub trait Alt: Functor {
// Required method
fn alt<A>(fa1: Self::Of<A>, fa2: Self::Of<A>) -> Self::Of<A>;
}Expand description
Alt: a Functor with an associative choice operation.
Laws:
- Associativity:
alt(alt(a, b), c) == alt(a, alt(b, c)) - Distributivity:
fmap(f, alt(a, b)) == alt(fmap(f, a), fmap(f, b))
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".