[][src]Trait monadic::monad::Bind

pub trait Bind<T>: IntoIterator<Item = T> + Sized {
    fn bind<U, F>(self, f: F) -> FlatMap<Self::IntoIter, U, F>
    where
        F: Fn(T) -> U,
        U: IntoIterator
, { ... } }

Bind<T> as supertrait of IntoIterator<Item=T>

IntoIterator brings "into_iter().flat_map()" where its lazy result type FlatMap implements IntoIterator

Provided methods

fn bind<U, F>(self, f: F) -> FlatMap<Self::IntoIter, U, F> where
    F: Fn(T) -> U,
    U: IntoIterator

bind consumes self

I could not do otherwise as into_iter() passes self by value, so Sized (size known at compile time) is required for Self

Loading content...

Implementors

impl<T, R> Bind<T> for R where
    R: IntoIterator<Item = T>, 
[src]

Loading content...