Trait radn::func::extensions::MonadExt
source · pub trait MonadExt<'a>: Monad<'a> {
// Provided methods
fn iterate_mut<A: 'a + Send, B: 'a + Send>(
a: A,
f: impl 'a + Send + FnMut(A) -> Self::F<ControlFlow<B, A>>
) -> Self::F<B> { ... }
fn bind2<A: 'a + Send, B: 'a + Send, C: 'a + Send>(
fa: Self::F<A>,
fb: Self::F<B>,
f: impl 'a + Send + FnOnce(A, B) -> Self::F<C>
) -> Self::F<C> { ... }
}Provided Methods§
sourcefn iterate_mut<A: 'a + Send, B: 'a + Send>(
a: A,
f: impl 'a + Send + FnMut(A) -> Self::F<ControlFlow<B, A>>
) -> Self::F<B>
fn iterate_mut<A: 'a + Send, B: 'a + Send>( a: A, f: impl 'a + Send + FnMut(A) -> Self::F<ControlFlow<B, A>> ) -> Self::F<B>
FnMut version of Monad::iterate.
Reasoning for this method existing at all is that
most usecases are better modelled with FnMut
rather than some dedicated state type.