[][src]Trait higher_cat::Bind

pub trait Bind<A, B>: Lift<A, B> {
    fn bind<F>(self, f: F) -> Self::Target1
    where
        F: Fn(A) -> Self::Target1
; }

Bind lets you chain computations together.

It takes a function Fn(A) -> M<B> and applies it to the A inside M<A>. You can think of this as a callback function for when the value of A is ready to be processed, returning the next computation in the sequence.

Required methods

fn bind<F>(self, f: F) -> Self::Target1 where
    F: Fn(A) -> Self::Target1

Use the value inside an M<A>: Bind to create an M<B>.

Loading content...

Implementations on Foreign Types

impl<A, B> Bind<A, B> for Option<A>[src]

impl<A, B, E> Bind<A, B> for Result<A, E>[src]

impl<A, B> Bind<A, B> for Vec<A>[src]

impl<A, B> Bind<A, B> for VecDeque<A>[src]

impl<A, B> Bind<A, B> for LinkedList<A>[src]

impl<A, B> Bind<A, B> for BinaryHeap<A> where
    A: Ord,
    B: Ord
[src]

impl<A, B> Bind<A, B> for BTreeSet<A> where
    A: Ord,
    B: Ord
[src]

impl<A, B, S> Bind<A, B> for HashSet<A, S> where
    A: Hash + Eq,
    B: Hash + Eq,
    S: BuildHasher + Default
[src]

impl<A, B, C, D, S> Bind<(A, B), (C, D)> for HashMap<A, B, S> where
    A: Hash + Eq,
    B: Hash + Eq,
    C: Hash + Eq,
    D: Hash + Eq,
    S: BuildHasher + Default
[src]

impl<A, B, C, D> Bind<(A, B), (C, D)> for BTreeMap<A, B> where
    A: Ord,
    B: Ord,
    C: Ord,
    D: Ord
[src]

Loading content...

Implementors

Loading content...