Trait scsys_core::hkt::applicative::Applicative

source ·
pub trait Applicative<U>: Functor<U> {
    // Required methods
    fn pure_(value: U) -> Self::T
       where Self: HKT<U, C = U>;
    fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> <Self as HKT<U>>::T
       where F: Fn(&<Self as HKT<U>>::C) -> U,
             Self: HKT<F>;
}

Required Methods§

source

fn pure_(value: U) -> Self::T
where Self: HKT<U, C = U>,

source

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> <Self as HKT<U>>::T
where F: Fn(&<Self as HKT<U>>::C) -> U, Self: HKT<F>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, U> Applicative<U> for Option<T>

source§

fn pure_(value: U) -> Self::T

source§

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> Option<U>
where F: Fn(&T) -> U,

source§

impl<T, U> Applicative<U> for Box<T>

source§

fn pure_(value: U) -> Self::T

source§

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> Box<U>
where F: Fn(&<Self as HKT<U>>::C) -> U,

source§

impl<T, U> Applicative<U> for Rc<T>

source§

fn pure_(value: U) -> Self::T

source§

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> Rc<U>
where F: Fn(&<Self as HKT<U>>::C) -> U,

source§

impl<T, U> Applicative<U> for Arc<T>

source§

fn pure_(value: U) -> Self::T

source§

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> Arc<U>
where F: Fn(&<Self as HKT<U>>::C) -> U,

source§

impl<T, U> Applicative<U> for Vec<T>

source§

fn pure_(value: U) -> Self::T

source§

fn seq<F>(&self, fs: <Self as HKT<F>>::T) -> Vec<U>
where F: Fn(&T) -> U,

Implementors§