usecrate::{Semigroup, Semigroupoid};/// A category is some collection of objects and relationships (morphisms) between them.
////// This idea is captured by the notion of an identity function for objects,
/// and the ability to compose relationships between objects.
pubtraitCategory: Semigroupoid {// A function which take something and return it again.
fnidentity(self)->Self;}impl<A: Semigroup +Clone> Category forOption<A>{fnidentity(self)->Self{self}}#[cfg(test)]modtests{usecrate::Category;#[test]fnoption_compose(){let a =Option::Some(String::from("FOO"));assert_eq!(Option::Some(String::from("FOO")), a.identity());}}