karpal-arrow 0.5.0

Category and Arrow hierarchy for the Industrial Algebra ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::semigroupoid::Semigroupoid;

/// Category: a Semigroupoid with an identity morphism.
///
/// Laws:
/// - Left identity:  compose(id(), f) == f
/// - Right identity: compose(f, id()) == f
pub trait Category: Semigroupoid {
    fn id<A: Clone + 'static>() -> Self::P<A, A>;
}