CausalMultiVectorWitness

Struct CausalMultiVectorWitness 

Source
pub struct CausalMultiVectorWitness;

Trait Implementations§

Source§

impl Applicative<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn pure<T>(value: T) -> CausalMultiVector<T>

Lifts a pure value into the minimal applicative context F::Type<T>. Read more
Source§

fn apply<A, B, Func>( f_ab: CausalMultiVector<Func>, f_a: CausalMultiVector<A>, ) -> CausalMultiVector<B>
where Func: FnMut(A) -> B, A: Clone,

Applies a function wrapped in a context (f_ab) to a value wrapped in a context (f_a). Read more
Source§

impl BoundedAdjunction<CausalMultiVectorWitness, CausalMultiVectorWitness, Metric> for CausalMultiVectorWitness

Source§

fn left_adjunct<A, B, F>(ctx: &Metric, a: A, f: F) -> CausalMultiVector<B>
where F: Fn(CausalMultiVector<A>) -> B, A: Clone + Zero + Copy + PartialEq, B: Clone,

The Left Adjunct: $(L(A) \to B) \to (A \to R(B))$ Transforms a function on the “Left” structure to a function on the “Right” structure, using the provided context.
Source§

fn right_adjunct<A, B, F>(ctx: &Metric, la: CausalMultiVector<A>, f: F) -> B
where F: FnMut(A) -> CausalMultiVector<B>, A: Clone + Zero, B: Clone + Zero + Add<Output = B> + Mul<Output = B>,

The Right Adjunct: $(A \to R(B)) \to (L(A) \to B)$ Transforms a function on the “Right” structure to a function on the “Left” structure, using the provided context.
Source§

fn unit<A>(ctx: &Metric, a: A) -> CausalMultiVector<CausalMultiVector<A>>
where A: Clone + Zero + Copy + PartialEq,

The Unit of the Adjunction: $A \to R(L(A))$ Embeds a value into the Right-Left context, using the provided context.
Source§

fn counit<B>(_ctx: &Metric, lrb: CausalMultiVector<CausalMultiVector<B>>) -> B
where B: Clone + Zero + Add<Output = B> + Mul<Output = B>,

The Counit of the Adjunction: $L(R(B)) \to B$ Collapses the Left-Right context back to a value, using the provided context.
Source§

impl BoundedComonad<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn extract<A>(fa: &CausalMultiVector<A>) -> A
where A: Clone,

Source§

fn extend<A, B, Func>( fa: &CausalMultiVector<A>, f: Func, ) -> CausalMultiVector<B>
where Func: FnMut(&CausalMultiVector<A>) -> B, A: Zero + Copy + Clone, B: Zero + Copy + Clone,

Source§

impl Functor<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn fmap<A, B, F>(fa: CausalMultiVector<A>, f: F) -> CausalMultiVector<B>
where F: FnMut(A) -> B,

Applies a function f to the value inside the container m_a. Read more
Source§

impl HKT for CausalMultiVectorWitness

Source§

type Type<A> = CausalMultiVector<A>

The Generic Associated Type (GAT) that represents the type constructor. The <T> is the “hole” in the type constructor (e.g., Option<T>).
Source§

impl Monad<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn bind<A, B, Func>(m_a: CausalMultiVector<A>, f: Func) -> CausalMultiVector<B>
where Func: FnMut(A) -> CausalMultiVector<B>,

Chains a computation from an effectful value, flattening the result. This is the core sequencing operation of a Monad. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.